function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lohith mlohith m 

Record type in triggers

i have a small question as am new salesforce learner please can anyone explain me about the record type and how we can use in the triggers with an simple example.. and is there any relation ship between record types and picklist values and can we create the recordtype without picklist values....... please this will help me a lot.... thanks in advance ..... :) 
bob_buzzardbob_buzzard
Record types are simply a way of segmenting an sobject.  For example, you might have record types defined for Account of Customer and Supplier, as you need to treat these two types of accounts very differently.  Record types can have specific page layouts and picklist options, to allow you to restrict the fields that are available.

You'd use record types in triggers if you needed to carry out different processing based on the record type.
lohith mlohith m
thank u @bob_buzzard for the answer but my another question is that recordtype values can only implemented if we have picklist values...
bob_buzzardbob_buzzard
When you specify a record type you can choose the picklist values to include in that record type.  You don't have to have any picklist fields to implement record types, and you can leave the picklist values as they are when creating a record type. Its a way to allow you to restrict the picklist options available rather than force you to use them.  I'd suggest you have a play around with this in a developer edition to get a full understanding.
lohith mlohith m
Thank u @bob_buzzard  u r answer helped me .......