Ads

Monday, 15 April 2013

Executing Trigger based on field value in Salesforce?

Sample Trigger:

 trigger test on Member__c (after insert)
{
    List<Case> cases = new List<Case>();

    for(Member__c mem:Trigger.new)
    {
        if(
mem.Comments__c != null || mem.Comments__c != '')
        {
                Case newCase = new Case(subject='Material',Status='New',Origin='Web');           
                insert newCase;

        }
    }

}

No comments:

Post a Comment