+ 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.