• Daniel Alaniz
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
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
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