Hi All,
I'm having a specific requirement where on a button click, need to duplicate that entity's Related record along with its related records.
Basically entity A -> entity B -> entity C.
What I have achieved so far,
On click of Record(X) of Entity A, collect data in collection of all related records (Y) in Entity B and another collection of records relating to Record(Y) in entity C.
Now I have duplicated Record(X) in Entity A and related Record(Y) to Entity B.
I'm stuck where I need to duplicate Record(Z) from entity C related to new Record(Y) from Entity B.
I'm gone through MS Docs. came across With() function which can help but I have no idea how to use. With Function
I need to perform ForAll() into With.
Need Advice.
Thanks