Heya friends. I’m setting up a custom record type...
# suitescript
j
Heya friends. I’m setting up a custom record type (“Subscriber”) with parent as Transaction. It will appear as a sublist on Transactions. When a transaction is transformed (e.g. Sales Order being approved and Purchase Orders / Invoice created, or Sales Order created from Estimate) the sublist needs to be replicated on the new transaction. What would be the best way to achieve this? I’m thinking a workflow custom action that runs when a transaction is created with a “created from” value that’s non-null, and just do a copy record on each “Subscriber” record and change the parent TX. Is there a better/simpler way?
b
you might be able to get away with using a multiselect for the parent field if you want to reuse the custom record and can live with the sublist being a list type sublist
j
nope
unfortunately the sublist records may differ from tx to tx but they do need to self-replicate much the same way as all the other tx data
n
Could you use an additional Custom Record which will store the relationships between transactions and subscribers?
j
….why?
not sure the advantage of that
n
The relationship could be captured there and it’s that relationship ‘record’ which could go on the transactions in a custom body field. Only the custom body field would need be replicated to the new transactions. The Subscriber Sublist is filtered by the custom body field instead of the invoice # or PO #.
j
I see. Won’t really work for my use case unfortunately. Thanks for the suggestion.
it’s less of a schema question and more of a “how best to copy child records” question