FuelSDK-CSharp icon indicating copy to clipboard operation
FuelSDK-CSharp copied to clipboard

invalid junction id-list: Must use a String[] or List<String> value to update

Open fahadmajeedrana opened this issue 4 years ago • 0 comments

Hi I am trying to consume the bulk api and migrate email messages. I am receiving "salesforce invalid junction id-list: Must use a String[] or List<String> value to update ToIds" while setting the ToIds as a string array or list of string (code below). Could someone please advise how to pass list or an array. Thanks.

var email = new SObject { { "Status" , "0" }, {"Incoming" , true}, {"RelatedToId" , "0015g00000GHOTxAAP" }, {"FromAddress" , "[email protected]"}, {"FromName" , "fahadmajeedrana"}, {"Subject" , "Subject"}, {"TextBody" , "Body"}, {"ToIds" ,new string[] { "0035g000006Yn1WAAS" } }, {"toAddress" , "[email protected]"}, {"CreatedDate" , DateTime.Now.AddDays(-2).ToUniversalTime().ToString("yyyy-MM-ddTHH\:mm\:ss")}, {"CreatedById" , "0055g00000ADACm"}, {"LastModifiedById" , "0055g00000ADACm1"} };

or

var email = new SObject { { "Status" , "0" }, {"Incoming" , true}, {"RelatedToId" , "0015g00000GHOTxAAP" }, {"FromAddress" , "[email protected]"}, {"FromName" , "fahadmajeedrana"}, {"Subject" , "Subject"}, {"TextBody" , "Body"}, {"ToIds" , new List<String> { "0035g000006Yn1WAAS" }}, {"toAddress" , "[email protected]"}, {"CreatedDate" , DateTime.Now.AddDays(-2).ToUniversalTime().ToString("yyyy-MM-ddTHH\:mm\:ss")}, {"CreatedById" , "0055g00000ADACm"}, {"LastModifiedById" , "0055g00000ADACm"} };

fahadmajeedrana avatar Jun 13 '21 14:06 fahadmajeedrana