Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

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

Open
fahadmajeedrana opened this issue Jun 13, 2021 · 0 comments
Labels

Comments

@fahadmajeedrana
Copy link

fahadmajeedrana commented Jun 13, 2021

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 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 { "0035g000006Yn1WAAS" }},
{"toAddress" , "[email protected]"},
{"CreatedDate" , DateTime.Now.AddDays(-2).ToUniversalTime().ToString("yyyy-MM-ddTHH\:mm\:ss")},
{"CreatedById" , "0055g00000ADACm"},
{"LastModifiedById" , "0055g00000ADACm"}
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant