Activity Forums Salesforce® Discussions How to convert a Set to Set in Apex Salesforce?

  • Abhinav

    Member
    August 11, 2016 at 4:05 pm

    Hi Tanu,

    Yes, here is the sample code :-

    Set<Id> ids = new Set<Id>{'001C000001DgWqW','001C000001DgWsE'};
    Set<String> idStrs = (Set<String>)JSON.deserialize(JSON.serialize(ids), Set<String>.class);

    System.debug('idStrings=' + idStrs);

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos