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
roni shoreroni shore 

variable assignment

I have a scenario. Unable to assign value to dummy variable. pls suggest
           
             String dummyVal;
             dummyVal = object1.Group_Member__c;
             String dummy;
             dummy = dummyVal.SVM__c;// unable to assign value here
             system.debug('dummy'+dummy);
            
Best Answer chosen by roni shore
Raj VakatiRaj Vakati
Its validate .. 

Because you are referring the reference from the  SVM__c from dummyVal String whihc is not possiable .. 


TRy this 
 
String dummyVal;
             dummyVal = object1.Group_Member__c;
             String dummy;
             dummy = object1.SVM__c;// unable to assign value here
             system.debug('dummy'+dummy);