Skip to main content
I have Map<String, String> m1 = ........;/(Map Contain only one record information)

And I want to update the record into account How can I do this?

 
10 answers
  1. Aug 3, 2017, 10:04 AM
    Hello Sagarika Rout,

    Your post is helpful if we make some changes:

     

    Account acc_Object = new Account();

    SObject sobj = acc_Object;

    for(String Field_API_Name: m1.keySet())

    {

    if(sobj.get(Field_API_Name).isEditable())

    {

    sobj.put(Field_API_Name, m1.get(Field_API_Name));

    }

    }

    Account update_Acc = (Account)sobj;

    update update_Acc;

    But there is a problem to update non-editable fields.

    Please help me to update the record...!!!!
0/9000