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

Custom New Button

I have two objects, General Intake and Program Intake. Program Intake has a lookup to the General Intake. Both objects have a lookup to the Contact.


We don't want the Program Intake related list to appear on the page layout of the General Intake, but we want to build a custom button that creates a new Program Intake (goes to the edit page of a new program intake). 


1. I want the General Intake and Contact Name to automatically populate on the Program Intake record from the General Intake record that it was created from (do not want to use formulas, need these to remain lookup fields).


2. In changing the URLs, you cannot change the Field ID for the General Intake lookup field. This would be fine if we didn't have to deploy between multiple environments.


It has been suggested to write a button using Javascript. Does anyone have any coding they might share with me to make this happen? I am unfamiliar with Javascript.