You need to sign in to do that
Don't have an account?
Michael Minnekeer
ID on merge field in custom button returns as 0
Hi,
I am trying to create a simple button for an Opportunity that brings the user to a new record page for a custom Object called Policies(Policies__c). The reason I need a custom button is because there is an account lookup field that I want auto populated when clicking new policy off the opportunity.
However when inserting the Opportunity Name and and Opportunity ID in the custom field for the opportunity lookup it returns as expected with the correct name but the ID returns as 0. I could just remove the ID part and it would work but it causes confusion for a user if there are multiple opps with the same name for example.
Here is what it looks like if I was to hit the default button(doesnt contain Account lookup)
/a04/e?
CF00NN0000001MqbU=testy+testy+-+Risk+Sales+-+2015-11-03
&CF00NN0000001MqbU_lkid=006N0000007UtHL
&retURL=%2F006N0000007UtHL
My Custom one looks like this
/a04/e?
&CF00NN0000001MqbU={!Opportunity.Name}
&CF00NN0000001MqbU_lkid={!Opportunity.Id}
&CF00NN0000001MqO6={!Opportunity.Account}
&CF00NN0000001MqO6_lkid={!Opportunity.AccountId}
&retURL={!Opportunity.Id}
It returns the Account ID but not the opp ID
https://cs6.salesforce.com/a04/e?
&CF00NN0000001MqbU=testy+testy+-+Risk+Sales+-+2015-11-04&
CF00NN0000001MqbU_lkid=0
&CF00NN0000001MqO6=testy+testy
&CF00NN0000001MqO6_lkid=001N000000XgEcH
&retURL=0
I am trying to create a simple button for an Opportunity that brings the user to a new record page for a custom Object called Policies(Policies__c). The reason I need a custom button is because there is an account lookup field that I want auto populated when clicking new policy off the opportunity.
However when inserting the Opportunity Name and and Opportunity ID in the custom field for the opportunity lookup it returns as expected with the correct name but the ID returns as 0. I could just remove the ID part and it would work but it causes confusion for a user if there are multiple opps with the same name for example.
Here is what it looks like if I was to hit the default button(doesnt contain Account lookup)
/a04/e?
CF00NN0000001MqbU=testy+testy+-+Risk+Sales+-+2015-11-03
&CF00NN0000001MqbU_lkid=006N0000007UtHL
&retURL=%2F006N0000007UtHL
My Custom one looks like this
/a04/e?
&CF00NN0000001MqbU={!Opportunity.Name}
&CF00NN0000001MqbU_lkid={!Opportunity.Id}
&CF00NN0000001MqO6={!Opportunity.Account}
&CF00NN0000001MqO6_lkid={!Opportunity.AccountId}
&retURL={!Opportunity.Id}
It returns the Account ID but not the opp ID
https://cs6.salesforce.com/a04/e?
&CF00NN0000001MqbU=testy+testy+-+Risk+Sales+-+2015-11-04&
CF00NN0000001MqbU_lkid=0
&CF00NN0000001MqO6=testy+testy
&CF00NN0000001MqO6_lkid=001N000000XgEcH
&retURL=0
Not sure if I've ever seen this before but I came across this post in the success community that sounds similar; let me know if this helps:
https://success.salesforce.com/answers?id=90630000000DHGYAA4
All Answers
Not sure if I've ever seen this before but I came across this post in the success community that sounds similar; let me know if this helps:
https://success.salesforce.com/answers?id=90630000000DHGYAA4