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
JT.ax78JT.ax78 

Update Contact Error

Hello,

I am trying to update a contact from a VB.NET project using this code...

Dim updateContact As SalesForce.Contact = New SalesForce.Contact

updateContact.Id = ResultRecord(EditingID).InternalID

Dim errorContact As SalesForce.Contact = New SalesForce.Contact

errorContact.Id = "s:dlfk"

Dim SaveResults As SalesForce.SaveResult = binding.update(New SalesForce.sObject() {updateContact, errorContact})

I receive the following error once typing in the code in

(1090): Value of type '1-dimensional array of SalesForce_Editor.SalesForce.SaveResult' cannot be converted to 'SalesForce_Editor.SalesForce.SaveResult'.

I have checked this code against the sample code that can be downloaded and there appears to be no difference - aside from the obvious one that the sample code updates an Account but I have previously made this code work in another project?

Can anyone help ??

Thanx in advance.

 

SuperfellSuperfell
update returns an array of SaveResults, (one for each object you tried to update), try

Dim SaveResults() As SalesForce.SaveResult = binding.update(New SalesForce.sObject() {updateContact, errorContact})
JT.ax78JT.ax78

Hi there,

I guess the '1 Dimension' reference in the error should have given me a clue!

Haven't had an error after typing that in so will give it a run and see what happens!

Thanks for your help!

JT