You need to sign in to do that
Don't have an account?
vishesh91
dynamically access sobject field
Hi I have a situation where users wants to update fields of an sobject.User will provide field name to be updated and tha new value.How do I access the same field on SObject.Do I have to use switch for all fields.then What if new field is added to sobject ?
See SObject.get() and SObject.put() in the language reference for details, but basically, you can pass in strings to get and set fields.
Examples: