-
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
How to insert sObjects records using Visualforce Remote Objects ?
Visualforce Remote Objects: Visualforce Remote Objects are proxy objects that enable basic DML operations on sObjects directly from JavaScript. Remote objects don't require @RemoteAction methods…
What are Flow Best Practices in 2023?
There are some best practices that you must follow while working on flow. They are: Plan your Flow Before you Start Building Write or draw…
How Salesforce Uses Process Street on Effective Client Boarding
Client onboarding means introducing clients to your company or business. These days, consumers expect from businesses more than just a product or service. They’re in…
Popular Salesforce Videos
Salesforce Marketing Cloud Connector for UiPath
This is a connector for Salesforce Marketing Cloud that allows you to work in the background with SFMC instance. watch this video and let us…
Salesforce Staff Has Option to Keep Working From Home
Dan Bognar, head of the strategy for Asia at Salesforce.com Inc., discusses how the coronavirus outbreak is affecting the San Francisco-based software maker’s operations and…
Salesforce Service Cloud Einstein Bots
Learn how to set up and use Einstein Bots to increase case deflection and reduce service costs through self-service. This webinar gives you a guided…