function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cmascrenhas1.3965215542573457E12cmascrenhas1.3965215542573457E12 

Creating Child Records Using Custom Button in Parent Record

Hi,

I wish to create Child records Using Custom Buttons in Parent records. I gave the below value in the field .

{!URLFOR( $Action.Division_Revenue__c.New, Division__c.Id )}  but when the page opens it does not take the URL but simply passes the same value as text to the address tab. Hence I get URL not found.

Could you kindly guide me in anything I am missing out.

Thank you,

Regards,
Christwin
Ramu_SFDCRamu_SFDC
The following post seems to have the answer for your requirement

https://success.salesforce.com/answers?id=90630000000gwhCAAQ
cmascrenhas1.3965215542573457E12cmascrenhas1.3965215542573457E12
Thank you so Much...

This looks like automatically creating the record without use inputs at that time.Could you please let me know if the fields in the records can be entered by the user ( instead of autocreation of values in the script) through the button. 

Thought {!URLFOR( $Action.Division_Revenue__c.New, Division__c.Id )} would open a new record for editing with the look up already filled in.. the URL passed in this case is simply having URLFOR( $Action.Division_Revenue__c.New, Division__c.Id without any editings.May be they are not encoded properly to the salesforce IDs..May be Im missing something 

Thank you so Much..Please Guide me through
Francesco Carmagnola 10Francesco Carmagnola 10
You can try using this Lightning Component I am currently developing, maybe can fit your needs!

https://github.com/fracarma/Lightning-Object-Creator-Component

Thanks