-
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
G-Connector for Salesforce - Part 1
G-Connector for Salesforce It's a great tool or you can say an add-on that can help you to save your Salesforce Licenses. G-Connector is a…
Boost Your Sales with Effective Email Pitch Strategies in Salesforce
Clear communication with prospects is the key to building relationships and increasing sales, especially for B2B businesses. As B2B sales involve higher transaction value and…
Top Sales Challenges in 2023 Which Salesforce Sales Cloud Can Solve
There’s no denying the fact that a sales job is full of challenges. Sales managers are constantly on the lookout for ways to optimize their…
Popular Salesforce Videos
8 Steps to Become a Salesforce Developer!
Do you aspire to become a Salesforce developer? Are you stuck on what next steps you need to take to become a developer? Check out…
Salesforce JMS Integration Using MuleSoft | Salesforce Tutorial
Salesforce JMS Integration. In this video, the following points will be covered - 1. Introduction Learn how to use queues to integrate data in Salesforce.…
What is Salesforce Integration? | Saleforce Integration Explained
Learn how to seamlessly connect different tools and data sources with your Salesforce platform. It's all about making informed decisions and gaining a competitive edge!…