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
GirinoobGirinoob 

$RecordType.Name throwing unknown exception

Hi, I am using formula field in the campaign member object, and i want to store RecordType name in the field. When i use $RecordType.Name as my formula it saves successfully without error. But, when i write soql query like: [Select nameoftheformulafield from campaignmember]; it is throwing up unknown exception. Can any tell me what is the reason ?
sivaextsivaext

Hi 

 

it is working fine me, tell me exactly what error you facing, may be your getting list of records but stored in normal variable

 

example:

 

Account cm = [select Recordformula__c  from Account where name = 'test345'];
system.debug('................'+cm.Recordformula__c);