You need to sign in to do that
Don't have an account?
DannyTK
How to add a Profile restriction to Javascript button
Good morning,
I have an easy one for someone to answer (easy for a developer, not for me),
I created a Javascript button to update the Status field on a Custom Object (Sales Order), but only want specific profiles to be able to click this button: the javascript for the button to update works fine, but I'm not sure how to add a line to make it execute only for specific profile(s):
{!requireScript("/soap/ajax/29.0/connection.js")}
var sor = new sforce.SObject("Sales_Order__c");
sor.Id = "{!Sales_Order__c.Id}";
sor.Status__c = "Sales Order Completion";
var result = sforce.connection.update([sor]);
window.location.reload();
Can somebody guide me on how to add a line to allow for only specific profiles (or to restrict certain profiles)
I have an easy one for someone to answer (easy for a developer, not for me),
I created a Javascript button to update the Status field on a Custom Object (Sales Order), but only want specific profiles to be able to click this button: the javascript for the button to update works fine, but I'm not sure how to add a line to make it execute only for specific profile(s):
{!requireScript("/soap/ajax/29.0/connection.js")}
var sor = new sforce.SObject("Sales_Order__c");
sor.Id = "{!Sales_Order__c.Id}";
sor.Status__c = "Sales Order Completion";
var result = sforce.connection.update([sor]);
window.location.reload();
Can somebody guide me on how to add a line to allow for only specific profiles (or to restrict certain profiles)
You will have to use different page layout with button and then assign those layouts to the profiles.
More information can be found at following link :
http://help.salesforce.com/apex/HTViewSolution?id=000002488&language=en_US
http://help.salesforce.com/HTViewHelpDoc?id=customize_layoutoverview.htm&language=en_US
http://help.salesforce.com/HTViewHelpDoc?id=customize_layoutassign.htm&language=en_US
Thanks,
Amit Bhardwaj