Forum Replies Created

  • Amit

    Member
    March 29, 2016 at 2:39 pm in reply to: How can we convert a Set to Set in SFDC?

    Hey @dannaray
    I have collected some code to do so :
    Set ids = new Set{'001C000001DgWjE','001C000001DgWjD'};
    // Here's the one line!
    Set idStrs = (Set)JSON.deserialize(JSON.serialize(ids), Set.class);
    System.debug('idStrings=' + idStrs);

    I didn't tried but it seems it will help you.

  • Amit

    Member
    March 29, 2016 at 8:04 am in reply to: Order Of Events Execution?

    Hi @shubhamsharma
    As you asked about why salesforce executes any validation after "before Trigger"
    --
    So suppose you have a validation to restrict a candidate with name "ANGRY" and you have a before trigger which will change the value of "ANGRY" to "HAPPY" so in this case your validation will not restrict the candidate from filling up the form as it is getting HAPPY as a input before DML, but if validation executed first then your before trigger will never fire and will not get a chance to execute it's functionality to change "ANGRY" to "HAPPY".
    Many software system corrects user inputs and then provide it to System so in such situations this flow will help.

Popular Salesforce Blogs

Popular Salesforce Videos