You need to sign in to do that
Don't have an account?
AK_Smith
Error Initial term of field expression must be a concrete SObject
Hello!
Please help me to fix an error in my code
Please help me to fix an error in my code
global class UpdateAct Implements Schedulable { global void execute(SchedulableContext sc) { doexecute(); } public void doexecute() { list<CTPHARMA__Activity__c> AllRecords = new list<CTPHARMA__Activity__c>(); AllRecords = [select Id from CTPHARMA__Activity__c where Id = 'a028E000003U83o']; if (!allRecords.isEmpty) { for (CTPHARMA__Activity__c pg : allRecords){ pg.RecordTypeId = '012b00000004hic'; } update AllRecords; } } }
You are missing field RecordTypeId in SOQL Query.
Use the below-updated code and let me know if it works for you.
Thanks
Lokesh
Thanks,
Harshit garg