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
Samantha ChuaSamantha Chua 

Concatenating Merge Fields in Javascript Custom Button

Hi Guys!

I am creating this custom button. What it does is that it will create a contract and push values from opportunity over, whenever it is being clicked.

Running into a problem here as I am trying to make my contract name = Opportunity contract type + Opportunity product + opportunity account name.

How do i do the concatenation?

Here is a snippet of my codes:
c.Name = "{!Opportunity.Contract_Type__c}"; + "{!Opportunity.Account}";
Any help is greatly appreciated!

Regards,
Samantha (:
 
Nayana KNayana K
This may work

c.Name = "{!Opportunity.Contract_Type__c}" + "{!Opportunity.Product2.Name}" + "{!Opportunity.Account.Name}";
Samantha ChuaSamantha Chua
Nope, sadly it does not ); Thanks for your input! Best regards, Samantha