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
mbbendermbbender 

Creating an OpportunityContactRole with AJAX toolkit

Code not working for some reason. Any ideas.
 
Code:
var oppContactRole = new sforce.SObject("OpportunityContactRole");
oppContactRole.ContactId = '0037000000RjQis';
oppContactRole.OpportunityId = '00670000009RroZ';
oppContactRole.Role = 'Hidden Contact';
sforce.connection.Create({oppContactRole});

 
I get the error:
missing : after id property
mbbendermbbender
I lower cased the "c" in create and changed the {} around my sObject to [] and it worked.