-
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
Salesforce Visualforce Vs Salesforce Lightning Component
Visualforce On the server-side a strong set of tags solved in Visualforce. The visualforce framework is called a center page internet application type. Since the…
How to Merge Duplicate Accounts & Contacts in Salesforce Lightning
The differences are stark between the Salesforce Classic and the Salesforce Lightning Experience when it comes to duplicates records. In Salesforce Lightning duplicate alerts are…
The Dynamics of Development: How Salesforce Developers Drive Innovation
In the ever-evolving landscape of customer relationship management (CRM), Salesforce has emerged as a powerhouse, empowering businesses to enhance customer engagement, streamline processes, and drive…
Popular Salesforce Videos
Salesforce to Twilio Integration Using MuleSoft | SFDC
Take a look at how Twilio integration with Salesforce is done using MuleSoft. This tutorial will cover the following points - 1. Introduction Learn how…
Salesforce Einstein Prediction Builder and Einstein Next Best Action
Salaesforce Einstein Prediction Builder is a declarative tool that helps fast-track predictions based on Salesforce fields. This will help a Salesforce admin to custom-build predictions…
How to Create a Landing Page in Salesforce Account Engagement (Pardot)?
A landing page acts as a customized doorstep for potential clients. It's crucial because it guides their focus toward a particular action, such as signing…