Thursday, February 14, 2019

Use Scheduled Workflow to Update Sublist Item


Worflows are unable presently to access sublists/line items on a record.  One alternate solution to this is using a SuiteScript.  If that isn't an option then it could be possible to use a scheduled workflow if having the record updated as much as 30 minutes after the workflow exits then the following solution should work.

This can be done by creating a workflow that runs on the Record Type of the sublist item.  First create a saved search for all the record that need to be updated.  Then use that saved search as criteria in the scheduled workflow.

Below is an example of a scheduled workflow that updates Purchase Orders that are Fully Billed and don't have a custom field set.

1. Create the saved search
        Reports > Saved Searches > All Saved Searches > New
        Select Transaction
        For the Criteria set:
            -Type = Purchase Order
            -Status = Purchase Order:Fully Billed
            -Custom Field is empty
        Name the search and save
2. Create the workflow
        Customization > Workflow > Workflows > New
        Set Fields:
            -Record Type = Transaction
            -Sub Types = Purchase Order
            -Release Status = Released
            -Initiation = Scheduled
            -Saved Search = the saved search created in step 1
 Name the workflow and save
3. Add the functionality
        Click New State.  Name the state and save.
        Create a New Action of type Set Field Value
        Select the Custom Field and set the value to 'test'
        Save the action

In this example Purchase Orders will have a custom field to 'test' set up to 30 minutes after the transaction is paid in full. For example: A new Vendor Bill record is created from the Purchase Order and a Bill Payment Record is created from that fully paying off the transaction.  Then 0 to 30 minutes later the field is set to 'test' since the scheduled workflow runs every half hour.

No comments:

Post a Comment