-
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 DemandBlue Helped a Leading Mortgage Lending and Refinancing Company To Strategize New Lead Assignment Process With Use of On-demand Salesforce Solution
How A Leading Mortgage Company Streamlined More Lead Closures Implementing On-demand Salesforce Solution Better Customer expectations and more lead closures are the common factors for…
Driving Business Agility through On Demand Salesforce Services
When successful businesses are constantly changing with mergers, acquisitions, launches, and other events discover how an On Demand Salesforce service model can meet your fluctuating business…
Salesforce Email Studio - Everything That You Need to Know
Email marketing is one of the most effective forms of marketing in the digital age. By using powerful email marketing tools, you can target and…
Popular Salesforce Videos
Why To Sell Your SAAS Application On Salesforce AppExchange ?
From unparalleled market reach to seamless integration and trusted security, explore the benefits that await SAAS entrepreneurs on Salesforce AppExchange. Watch our latest webinar to…
Slack and Salesforce integration for Sales
Learn how you can extend your Salesforce investment to boost productivity and simplify collaboration across sales teams. See how teams can instantly get notified of…
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…