Here’s the system that will be used by workflow once we create the UI for it.
So this is called mdActions.
To see list of all actions, check console
mdActions.ItemsGet();
But as for now, there’s only 1 action (REST)
If you check more deeply, you can see the input and output options, input is what you send, output is what you receive.
So for REST API, you send the ID and Properties.
let input = {
id: 90, // Your REST API Request ID (find it inside admin panel from URL section
properties: [ // Properties that are configured inside Request.
{key: 'property-key1', value: 'property-value2'},
{key: 'property-key2', value: 'property-value2'}
]
};
mdActions.ItemGet('REST').Fn('run', {}, input, (success) =>
{
console.log(success); // Will return {success, message, data}
},
(error) =>
{
console.log(error); // Will return {success, message}
});
So what you would want to do, is to catch form submission and run this code with provided values.
Or wait until we create workflow