Hi all,
I have an incident entity with 2 business process flows and a set of customized buttons on account entity that will automatically create an incident using the web api.
The problem I am having is that depending on which button the user clicks the corresponding bpf should be applied to that record.
I know I could switch to the correct process using setActiveProcess when the record is opened but I would like to avoid it loading twice.
I have been reading this which states:
You can override the default logic of business process flows getting applied automatically to new entity records. To do so, set the ProcessId attribute of the entity to one of the following values while creating a new entity record:
- Set it to a specific business process flow entity (as an entity reference). In this case, the system will apply the specified business process flow instead of the default logic.
But I can't seem to figure out how this should be done, I have tried setting the value for processid like this:
entity["processid@odata.bind"] = "/workflows(" + businessProcessId + ")"; //This throws bad request
entity.processid = businessProcessId; //Finishes successfully but the correct BPF is not loaded when opening the record
Any help on how to solve this will be greatly appreciated
*This post is locked for comments
I have the same question (0)