Create a URL type List Button to pre-populate its value and parent record's value by default #inSalesforce

Create a URL type List Button to pre-populate its value and parent record's value by default #inSalesforce

Create a List Button (content source URL) on Opportunity suppose and Opportunity is added as a related list on Account. Once the button is created, test it clicking on this new button from Oppty Related List on Account Page and verify that the values are defaulted.

We are defaulting here the following - Account Name/Id, Discount Percent to 10%, Type, testText field, StageName field, Close date to a future date and Opportunity is same as Account Name with a 'from' keyword appended.

Once the button is created make sure the button in added in the related list of the correct Account layout else this new button will not reflect.

Suppose the button name is - Quick Oppty

/lightning/o/Opportunity/new?defaultFieldValues=Account={!Account.Name},AccountId={!Account.Id},Discount_Percent__c=10,Type=Existing Customer - Replacement,testText__c=SampleText,StageName=Prospecting,CloseDate={!TEXT(TODAY()+365)},Name=from {!Account.Name}

Comments