In my application I have a two record types with a One to many relationship.
recordType!Workflow -> recordType!Task.
I have process that needs to create a Parent record and child records.
Currently I have two Script Process Nodes.
Process 1. Creates workflow record and store in pv!workflow.
Process 2. Creates multiple task records and appends to pv!workflowTasks.
Then I call Write records to store the records to the db.
My question is, do these have to be two seperate Script Process Nodes? Or can I combine my logic into one Script Process Node where Output 1 creates the workflow record in pv!workflow and then the second output creates the task records and appends them to pv!workflow.tasks?
Discussion posts and replies are publicly visible
Yes it is possible. But choosing to combine it into one or keeping them separate is up to your use case! Depending on complexity or number of child records, keeping can separate can be easier to manage or debug issues when any data error happens. If they are simple combining them is alright.