You need to sign in to do that
Don't have an account?
Mayank Deshpande 22
Hi All , I have requirement that when i click on save button on account object three record created
I have requirement that when i click on save button on account object three record created in Account object having self relationship in three records.
means ---- when user click save {A,B,C} account created and A' ID is realted with B and C record , B's ID related with A.C record and same with C
kindly suggest how we can achive this in best possible way
means ---- when user click save {A,B,C} account created and A' ID is realted with B and C record , B's ID related with A.C record and same with C
kindly suggest how we can achive this in best possible way
Option 2 :--- >REST API Using Composite Resources
Thanks for asking a great question..
Well @Raj V has provided the good quick solution and it will work fine for tiny class but it may hit the governor limit when you are dealing with so many dmls and triggers.
I would recommend using insert all the record in one dml call, Using external ID fields as foreign keys. Check the sample code for your reference.
Note: This code is not compiled.
--
Thanks,
Prashant