You need to sign in to do that
Don't have an account?
Mokshada
On creating a record in one object(Teacher) automatically a record should be created on the other object(Student).
Create two Objects say Teacher(Parent) and Student(Child) having similar fields. On creating record of Teacher, associated student record should be created and vice versa. Additionally, updates should also be in sync i.e. updating the parent should reflect in the child and vice versa.
I want to do this with the help of salesforce flow how to do that?
Thanks
I want to do this with the help of salesforce flow how to do that?
Thanks
To create a record in one object (Teacher) and automatically create a record in the other object (Student) in Salesforce using Apex, you can follow these steps:
Create two custom objects, Teacher and Student, with similar fields.
Create a lookup relationship field on the Student object to the Teacher object.
Create a trigger on the Teacher object that creates a new Student record when a new Teacher record is created.
In the trigger, create a new Student record and set the field values from the new Teacher record. Make sure to set the lookup field to link the Student record to the Teacher record.
Insert the new Student record into the database.
Here's some sample code to get you started:
If you find my answer helpful, please mark it as the best answer. Thanks!