You need to sign in to do that
Don't have an account?
Charni Wiggins
URL does not exist error for custom button with logic
I would like to only allow access to the link on this button if users profile name contains Manager, I can't quite get it to work though, currently getting 'url does not exist error' even without the contains function...
Button:
{!IF( $Profile.Name == 'System Administrator', '/apex/echosign_dev1__AgreementTemplateProcess?masterId={!Contact.Id}&templateID=a8r0Y000000Cbld&emailaddress={!Contact.TR1__Secondary_Email__c}', null)}
Button:
{!IF( $Profile.Name == 'System Administrator', '/apex/echosign_dev1__AgreementTemplateProcess?masterId={!Contact.Id}&templateID=a8r0Y000000Cbld&emailaddress={!Contact.TR1__Secondary_Email__c}', null)}
Please, can you share the screenshot of the button definition, would be helpful in finding the issue?
RD
thank you :)
1. I see that you have mentioned the Salesforce instance, in the button definition. Can you double check that the instance is correct.
2. Also, can you check if the visualforce page you are redirecting to has a prefix, you might have to add the prefix to the URL as
/apex/prefix_VFpageName?parameters
3. What is the URL on the screen where you get the error that the URL does not exist? (Copy paste the browser URL value from the error screen. It could be that the URL is not formed correctly.)
the error url: https://cobwe.my.salesforce.com/one/apex%2Fechosign_dev1__AgreementTemplateProcess%3FmasterId%3D%7B%21Contact.Id%7D%26templateID%3Da8r0Y000000Cbld%26emailaddress%3D%7B%21Contact.TR1__Secondary_Email__c%7D
this is the namespace prefix (this is what you mean right?):
echosign_dev1
1. The prefix is correct.
2. From your error URL, if you see the contact id and the contact email address are not being set dynamically but instead, it is being taken as a string. I think this is what is causing the issue.
3. Also, it seems we cannot use functions in URL button, one way is to move this to a formula field with the return type as URL and then set the URL value in the button.
This is the link to a similar post
https://success.salesforce.com/answers?id=90630000000h2rgAAA
Hope it helps
RD
Just an update, while using the formula field in the URL put it inside a URLFOR formula. Like below
Can you share the formula which you wrote for the overall link.
Hi, Sure...
{!IF( $Profile.Name == 'System Administrator', URLFOR( Contact.Adobe_Perm_formula__c, echosign_dev1__SIGN_Agreement__c.echosign_dev1__RecipientId__c ), null)}
Where the Adobe Perm Formula field on Contact is:
"https://cobweb.lightning.force.com/apex/echosign_dev1__AgreementTemplateProcess?masterId=Contact.Id&templateID=a8r0Y000000Cbld&emailaddress=Contact.TR1__Secondary_Email__c"