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
frasuyetfrasuyet 

Custom New Button Syntax

I am building a new custom detail button using some syntax that was posted within the community.  I've re-engineered the syntax to work in my environment and get no errors when I save/check the syntax.
 
The button lives on the opportunity and its intent is to create a new Project record. When I click on the button I get an Insufficient Privileges error which is odd since I am sys admin and I am able to create a new project and account without the use of the button.
 
I am guessing, that my syntax below has some residue that doesn't jive with my org. I am guessing it's the /a0M/e but not sure. I verified that the field id 00N600...for Opportunity.Account is correct.
 
Code:
/a0M/e—retURL=%2F{!Project_x__c.Id}&cancelURL=%2F{!Opportunity.Id}&CF00N60000001d9kB={!Opportunity.Account}

Any ideas of why the insufficient privileges and what the /a0M/e could represent?
 
Thanks.
DSchachDSchach
try changing e-retURL to e?retURL
frasuyetfrasuyet

That could have been the problem but ulitimately it was because of the "a0M". I changed the vaule to my custom object id and it works like a charm. In my case:

/a09/e?retURL=%2F{!Project_x__c.Id}&cancelURL=%2F{!Opportunity.Id}&CF00N60000001d9kB={!Opportunity.Account}