-
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
Best Practices to Be Followed As a Salesforce Business Analyst
Salesforce Business Analysts are liable for improving the Salesforce occurrence and its maintenance. The Salesforce Business Analyst is responsible for plan, lead, and conduct gatherings…
Salesforce Field Service Lightning Mobile Extension Toolkit (Beta)
For any field service organization to be successful, it is important to give ample attention to the management. Managing the field forces and service technicians…
4 Steps to Successful Salesforce Data-Integration
Data integration is a process to streamline data from various sources into a single, unified view. The ultimate goal here is to pave a path…
Popular Salesforce Videos
Salesforce Announces New Salesforce CDP Updates | Salesforce CDP
Salesforce, one of the largest global providers of CRM solutions, launched Salesforce CDP last year. Salesforce Customer Data Platform is an enterprise customer data platform…
Salesforce Trailhead - Control Access to Fields
In this video, Your Coding Buddy covers how to control access to fields in Salesforce Trailhead. He explains that this is important for keeping data…
AMPscript FOR LOOP - Salesforce Marketing Cloud Functions in 5 minutes
Salesforce Marketing Cloud functions in 5 minutes! In this video Cameron Robert shows how FOR LOOPs work in Salesforce Marketing Cloud using some helpful visuals…