Another Salesforce blog!!!

Salesforce, Apex

getobject name by trigger.new


String sObjectType;
        if(Trigger.New != null)
            sObjectType = Trigger.New.getSobjectType().getDescribe().getName();
        else if(Trigger.Old != null)
            sObjectType = Trigger.Old.getSobjectType().getDescribe().getName(); 
           
        if(sObjectType == 'Exhibit__c'){

Leave a Reply

Your email address will not be published.

*