-
Using generic sObject to change fields of different Object types.
Hi guys,
I was trying to use the generic 'sObject' type to change the name field of any Standard or custom object in my org ( provided it has a field with API name = 'Name'). I used it as:
for(sObject a:sobj)
{
a.Name = 'Test';
}It gives the following error:
'Field expression not allowed for generic SObject'
Can anyone help me? Thanks
Log In to reply.
Popular Salesforce Blogs
Make Your CRM Future-Ready: Migrate from Salesforce Classic to Lightning
Classic and Lightning are the two common versions of the Salesforce CRM UI. The newer Salesforce Lightning version gives clients a more natural and easy-to-use…
Salesforce.org Aids Nonprofits in Connecting Data on An Integrated Platform
Salesforce has announced new innovations in their Winter '22 release that would assist organizations and grantmakers in meeting these problems by allowing them to access technology…
Popular Salesforce Videos
Exploring Salesforce composite Resources | Composite API
Exploring Salesforce composite Resources-- 0:00 Introduction 1:30 What is Composite Resources? 2:00 Composite Resources consists of 2:25 Composite request body 5:30 Composite request response 6:33…
What is Salesforce in Simple Words | Who Can Learn Salesforce
What Exactly is Salesforce, Why is Salesforce CRM tool most demand in the IT market nowadays, Who can learn Salesforce course, what is the average…
What is APEX? | Features of APEX | Salesforce Development Course
This is the first Chapter of the Salesforce Development Course video series. In this video, Shrey has answered the following questions: What is APEX? What…