Activity Forums Salesforce® Discussions How can I convert List into Sobject?

  • Mohit

    Member
    September 6, 2016 at 6:09 am

    Hi Pranav,

    You can achieve this by the this code:-

    List<sObject> sobjectList = new List<sObject>();
    for(string s : str)
    {
    sobjectList.add(new sObject(Name = s));// fill other required fields as well
    }
    insert sobjectList;

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos