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
WPCMSWPCMS 

Concatenation of Fields in a Custom Button

On a case we have an account name and a location name. I have set up my custom activity new butto to bring over the location name into one field

 

00T/e?
what_id={!Case.Id}
&00N80000003Au8R={!Case.Location__c}

 

This works great.

 

I want the field that I am updating to have the location name and the account name (Location - Account)

 

I tried

 

00T/e?
what_id={!Case.Id}
&00N80000003Au8R={!Case.Location__c}&&{!Case.Account}

 

This did not bring over the account. How do you concatenate two separate fields into one with Apex? 

 

Thank you in advance

Best Answer chosen by Admin (Salesforce Developers) 
David VPDavid VP

This has nothing to do with Apex.

That's good old url variables ;-)

 

Try something like

00T/e?
what_id={!Case.Id}
&00N80000003Au8R={!Case.Location__c}%20-%20{!Case.Account}

 

The '%20' is the url encoded version of a whitespace.

All Answers

David VPDavid VP

This has nothing to do with Apex.

That's good old url variables ;-)

 

Try something like

00T/e?
what_id={!Case.Id}
&00N80000003Au8R={!Case.Location__c}%20-%20{!Case.Account}

 

The '%20' is the url encoded version of a whitespace.

This was selected as the best answer
WPCMSWPCMS
Thank you, it works!