Activity Forums Salesforce® Discussions Can we apply the Record Type in sobject when trigger is fired.How?

  • Abhinav

    Member
    July 28, 2016 at 2:58 pm

    Hi Mohit,

    Yes, you can query the record type first on the basis of object.

    Please see the sample code below :-

    Id recordAccId = [select Id,name from RecordType where name='Accounts' and SObjectType='Account' limit 1].Id;

    And use the above recordAccId in the trigger. I hope this helps.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos