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
sbrmathsbrmath 

System.StringException: Invalid id error while accessing reference variable

Here is the code snippet 

acc.c_prop_cd__c = guestMatch.Prop

 

c_prop_cd__c is  a reference varaible & Prop is value i am getting from a web service callout.

 

I am getting  System.StringException: Invalid id error.

 

is there something i should do to assign value to a reference variable? 

Ajay111Ajay111

Convert "guestMatch.Prop" in string then assin to acc.c_prop_cd__c

 

Try this.

sbrmathsbrmath

guestMatch.Prop is already a string.