Learn how to create different records from the inventory lines of a Sales Order (or other inventory modules) with this simple and powerful coreBOS workflow setup!
Create support tickets for each product line of a Sales Order where product category is Hardware.
Obviously, you will be able to create any other type of entity under any type of conditions.
There are only a few things that you need to understand to get this workflow working correctly.
- How to loop over all the inventory lines of the sales order to create the records. It turns out that there is no way of doing that in the workflow system, but thanks to the Inventory Details module we can accomplish this by creating workflows on this module.
- How to launch a workflow only when a record is related to an entity. To accomplish this we simply need to do an empty or not empty check on any non-empty field in the related module. So, for our case, we will check the Related To field of the Inventory Detail module for the subject field on the Sales Order. If the Inventory Details record is related to a Sales Order then this field will have a value, if the record is related to some other module, the SalesOrder field will be empty.
- In order to be able to use the Create Entity workflow to create a record in another module, that module must have a relation field to the first module. This field can be created in the layout editor. In this case, we add a relation field to Inventory Details on the Support Ticket module.
With that information the final workflow looks like this:
You can see a full explanation and working example in this video:
I'm sure this Business Process Management setup will help you make your coreBOS more useful!