-
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
Questions to Ask Before Hiring the Services of a Salesforce Partner
To sustain in this era of cutthroat competition, maintaining superior customer relationships has become the need of the hour. This can be possible by providing…
Salesforce Postman Integration - A Short Guide
Connected App is provided by Salesforce to connect with the platform from any other application. Getting Started with Salesforce Connected App: Goto Setup, Search for…
Top 4 Considerations in Choosing your Salesforce CPQ Partner
Congratulations, you’ve made the decision to implement Salesforce CPQ! Now comes the challenging task of choosing the right Salesforce CPQ partner to help fulfill your…
Popular Salesforce Videos
10 Example Future Method with Test Class | Asynchronous Apex | Salesforce Development Training Video
Salesforce uses a queue-based framework to handle asynchronous processes from such sources as future methods and batch Apex. This queue is used to balance request workload across…
Multi-factor Authentication in Salesforce | Setup of MFA
Multi-factor Authentication in Salesforce: Salesforce offers simple, innovative MFA solutions that provide a balance between strong security and user convenience. Because your business requirements and…
Quick Text in Salesforce | Service Cloud | Salesforce Tutorial
In this video, we will talk about what is Quick text and how to implement those Quick texts inside Salesforce. Watch the video and let…