+ Start a Discussion
Nisha BabuNisha Babu 

How to implement rrecord type for custom object

How to implement the below thing using Record Type.
Expenses can be of 2 types – Travel Expense, Other Expense

Expense must have a Category picklist field, as below:
Travel Expense: Tickets, Transit, Food, Toll, Fuel, Accommodation
Other Expense: Training, Relocation, Certification, Stationary
 
Best Answer chosen by Nisha Babu
Onesh ReddyOnesh Reddy
Hi Nisha,

Follow the below steps to meet your requirement.
From the Object Detail Page.
1)  Create two Pagelayouts for the Custom Object,  add the Picklist field (Travel Expense: Tickets, Transit, Food, Toll, Fuel,       Accommodation Travel Expense and Other Expense) for first layout and Picklist field (Other Expense: Training, Relocation, Certification, Stationary) to the second Layout.
2) Create a Record type with name as Travel Expense and assign Pagelayout Travel Expense.(First page Layout you have created)
3) Create another Record type with name as Other Expense and assign Pagelayout Other Expense.(Second page Layout you have created)
4) Make sure you checkin the Active checkbox while creating Record Type.

For more info on how to create Record types, 
https://help.salesforce.com/apex/HTViewHelpDoc?id=creating_record_types.htm&language=en
https://help.salesforce.com/HTViewHelpDoc?id=customize_recordtype.htm
http://resources.docs.salesforce.com/200/16/en-us/sfdc/pdf/salesforce_recordtypes_cheatsheet.pdf


Please mark this solved if it helps you.

Best Regards,
Onesh.K

All Answers

anuj huriaanuj huria
for this you can use field dependencies in picklist

create two picklist fields in your custom object,
picklist1 contains travel Expense and Other Expense,
picklist2 contains  Tickets, Transit, Food, Toll, Fuel, Accommodation,Training, Relocation, Certification, Stationary
go to your object detailed page and in  "Custom Fields & Relationships" related list click on field dependencies
then click new
then in controlling dropdown list select picklist1 and in dependent drop down list select picklist2
 then in travel expense column sellect Tickets, Transit, Food, Toll, Fuel, Accommodation
and in other expence column select Training, Relocation, Certification, Stationary 
then click save

if this help mark this question as solved so that other can take benifit from this

if you need and help let me know

Thanks 
Regards
Anuj
Deepak GulianDeepak Gulian
Just make 2 different page layouts and assign it to different record types and add those both picklist fields in differnet layouts.
Nisha BabuNisha Babu
Hi Anuj,

Here you haven't used the record type.
I want it to be done using Record Types.

With Regards,
   Nisha

 
Nisha BabuNisha Babu
Hi Deepak,

Could u explain it in detail.
If possible,using diagrams.

With Regards,
   Nisha
anuj huriaanuj huria
Hi Nisha,

please refer this link for your requirement

https://help.salesforce.com/apex/HTViewHelpDoc?id=creating_record_types.htm&language=en

Thanks 
Regards 
Anuj
Onesh ReddyOnesh Reddy
Hi Nisha,

Follow the below steps to meet your requirement.
From the Object Detail Page.
1)  Create two Pagelayouts for the Custom Object,  add the Picklist field (Travel Expense: Tickets, Transit, Food, Toll, Fuel,       Accommodation Travel Expense and Other Expense) for first layout and Picklist field (Other Expense: Training, Relocation, Certification, Stationary) to the second Layout.
2) Create a Record type with name as Travel Expense and assign Pagelayout Travel Expense.(First page Layout you have created)
3) Create another Record type with name as Other Expense and assign Pagelayout Other Expense.(Second page Layout you have created)
4) Make sure you checkin the Active checkbox while creating Record Type.

For more info on how to create Record types, 
https://help.salesforce.com/apex/HTViewHelpDoc?id=creating_record_types.htm&language=en
https://help.salesforce.com/HTViewHelpDoc?id=customize_recordtype.htm
http://resources.docs.salesforce.com/200/16/en-us/sfdc/pdf/salesforce_recordtypes_cheatsheet.pdf


Please mark this solved if it helps you.

Best Regards,
Onesh.K
This was selected as the best answer
Deepak GulianDeepak Gulian
These is another alternate also, just create one picklist and assign the value to that picklist according to the different record type

Like in below screenshot you just need to edit the picklist available for editing and assign different picklist values based on the record type, in this case you dont need to create 2 different picklist fields or layouts.

User-added image
Nisha BabuNisha Babu
Hi Onesh,
The travel expense and the other expense are two separate picklist created in the custom object expense .right

With regards,
   Nisha
Onesh ReddyOnesh Reddy
Yes Nisha