You need to sign in to do that
Don't have an account?
Daniel Alaniz
Custom Button to update a checkbox
Need a litte guidence as i am HUGE novice , I am trying to create a Button on a custom object that will update a custom Checkbox I know it would be simple to just manually check the box but FOR SOM REASON the sales reps can not remember to do this so i think a button would be better for them.
This is what i have so far
{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
var newRecords = [];
var c = new sforce.SObject("Inventory_Transfer_c");
c.id ="{!Inventory_Transfer__c.Id}";
c.Ready_to_process__c = true;
newRecords.push(c);
result = sforce.connection.update(newRecords);
window.location.reload();
I am receving the following error
{faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'Inventory_Transfer_c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'Inventory_Transfer_c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }
Many Thanks
This is what i have so far
{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
var newRecords = [];
var c = new sforce.SObject("Inventory_Transfer_c");
c.id ="{!Inventory_Transfer__c.Id}";
c.Ready_to_process__c = true;
newRecords.push(c);
result = sforce.connection.update(newRecords);
window.location.reload();
I am receving the following error
{faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'Inventory_Transfer_c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'Inventory_Transfer_c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }
Many Thanks
If you have namespace in your org then you have to append before the objectname with double underscore like namespace__Objectname__c
All Answers
If you have namespace in your org then you have to append before the objectname with double underscore like namespace__Objectname__c