You need to sign in to do that
Don't have an account?
Mak One
In Standard Page Layout I want to create 1 more record of related Object.
Suppose I have Object Parent1 and Child1. Child1 is having lookup to Parent1.
Parent1 is having Standard Page Layout (Not Visualforce). Now, I want that whenever the user click on Save, with creating new Record of Parent1 it should also create new Record for Child1.
By default it will create record of Parent1 only. But with Parent1 I also want 1 record of Child1 to be created.
I don't want to convert whole Page to Visualforce Page.
What will be the best way to achieve this?
Is Trigger is the best way?
What are the other ways?
For NEW button we can goto Visualforce page which can forward you to standard page but for SAVE this thing we cannot do? Like when we click on Save it will save record and goto one Visualforce Page which will do it's processing then return back to Created Record or any default Page.
We cannot provide functionality in Standard Page Layout only? By Declarative approach or anything?
Parent1 is having Standard Page Layout (Not Visualforce). Now, I want that whenever the user click on Save, with creating new Record of Parent1 it should also create new Record for Child1.
By default it will create record of Parent1 only. But with Parent1 I also want 1 record of Child1 to be created.
I don't want to convert whole Page to Visualforce Page.
What will be the best way to achieve this?
Is Trigger is the best way?
What are the other ways?
For NEW button we can goto Visualforce page which can forward you to standard page but for SAVE this thing we cannot do? Like when we click on Save it will save record and goto one Visualforce Page which will do it's processing then return back to Created Record or any default Page.
We cannot provide functionality in Standard Page Layout only? By Declarative approach or anything?
Yes the AfterInsert Trigger on the parent object is the best solution, in the after insert trigger, you have the Parent Id so you can create the children record.
Good Luck
All Answers
Yes the AfterInsert Trigger on the parent object is the best solution, in the after insert trigger, you have the Parent Id so you can create the children record.
Good Luck