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
tjm_pacstratstjm_pacstrats 

Custom Button (javascript) won't work for all profiles

I have no idea what I'm doing wrong here.  I've created a custom button to change the record type and update a few fields.  It works perfectly for me (I'm the Admin) but it won't work for any other Profile.  

 

Please help!

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}

 

var newdemo = new sforce.SObject("Demo_Request__c");

newdemo.Id = '{!Demo_Request__c.Id}';

newdemo.Demo_Request_Sent_on__c="{!TEXT(TODAY())}";

newdemo.RecordTypeId="01280000000FEAe";

newdemo.Reject_Reason__c=null;

var result = sforce.connection.update([newdemo]);

 

if (result[0].success=='false')

{ alert(result[0].errors.message); }

else { location.reload(true); }

 

 

 

Message Edited by tjm_pacstrats on 04-20-2009 11:22 AM
tjm_pacstratstjm_pacstrats
It appears there is an issue with one of the fields I am trying to update.  Reject_Reason__c is a picklist.  For whatever reason, my profile will allow the button to set the field to null, but it will fail for any other profile.  Do I need to use special characters or code for a picklist?
kevin.chileskevin.chiles

Have you ensured through field level security that all of the other profiles have read write access to this field?