You need to sign in to do that
Don't have an account?
BCDBSA
Custom clone button in VF to clone child record with parent.Name populated
Hi All,
I have two custom objects with Master-Detail relationships, A__c (parent) and B__c (child).
When clicking "New" button in related list of B__c in A__c page layout, a VF page, named newBrecord is generated to let user create a new B__c record. One of the fields is populated with A__c.Name. For example, in the VF newBrecord page,
A__c.Name: A0001 (auto populated parent name not editable field)
B__c.Date__c: 5/15/2015 (input field)
B__c.Description__c: Asking Apex Questions (input field)
After clicking "Clone" button, the current B__c record should be saved, and a new VF newBrecord page should be in edit-mode with A__c.Name (not editable), Date__c, Description__c fields populated. The StandardController of the VF newBrecord page is B__c, and an extension is created to write APEX codes.
I am new to Salesforce and have worked on this functionality for a long time. I would really appreciate your help on this functionaly.
I have two custom objects with Master-Detail relationships, A__c (parent) and B__c (child).
When clicking "New" button in related list of B__c in A__c page layout, a VF page, named newBrecord is generated to let user create a new B__c record. One of the fields is populated with A__c.Name. For example, in the VF newBrecord page,
A__c.Name: A0001 (auto populated parent name not editable field)
B__c.Date__c: 5/15/2015 (input field)
B__c.Description__c: Asking Apex Questions (input field)
After clicking "Clone" button, the current B__c record should be saved, and a new VF newBrecord page should be in edit-mode with A__c.Name (not editable), Date__c, Description__c fields populated. The StandardController of the VF newBrecord page is B__c, and an extension is created to write APEX codes.
I am new to Salesforce and have worked on this functionality for a long time. I would really appreciate your help on this functionaly.
Thanks,
Karanraj
Thank you for your quick response.
However, what I want is clone function. I already have the "Save and New" method in my extension.
Thanks,