I've a custom javascript button, to update the field on same object. this is perfect working for admin user but not working for non admin user.
Code as;
{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/19.0/apex.js")}
if("{!Patient_Services__c.Service_Invoiced__c}"== "0" )
{
if("{!Patient_Services__c.Who_to_Invoice__c}"=="Facility Account")
{
var c = new sforce.SObject("Patient_Services__c");
c.id = "{!Patient_Services__c.Id}";
c.Ready_for_Billing__c= "1";
result = sforce.connection.update([c]);
window.location.reload();
}
}
i'm try on profile finance user(not admin). The following permission for ready for billing field and object
Profile Permission for object; not given any access.
Permission set for object(User) : Read, Create, Edit, View All
Field accessibility for field : visible to page layout and profile.
when i click on custom button, the page is refreshed but field is not update. Please suggest.
console.log("result:::",result); //window.location.reload();
your result is passed or failed is print in your console logs.