+ Start a Discussion
asish1989asish1989 

How To filter data by using Record Type

Hi 

I have a custom Object which has Status__c field(picklist type) .Status has different values such as 'RELEASED' , 'EDITED'.   'IN TIMER MODE' , 'STARTED' , 'CLONED' . I have two recordType 'ReleasedType'  and  'UnReleasedType' and also two layout 

Released layout and UnReleased layout . Relesed layout has ReleasedType and Uneleased layout has UnReleasedTyoe field .

Now my requirement is... When I click on my custom object to view records ... It should ask which record Type to choose.. If I choose Released Type then I can only see All released Record in Releasedlayout .same for Unreleased Type .

Please help me as soon as possible... Its urgent ... 

 

Thanks

asish

Jerun JoseJerun Jose
You can simply use list views for this purpose. Create two public list views with the record type filter you mentioned. Then when the users click on the object tab, then can switch the list view to see Released or Unreleased records. You can also do some reports which can do the same thing.

If you are adamant on getting some code for this, then you will need a visualforce page to override the object tab. This page will take in the choice for which view they want, either through some links clicked or a drop down. and based on that action it will do some AJAX rerendering to show the required records or maybe navigate to a new VF page to show the data selected
asish1989asish1989

Hi Jerun

 Can you tell me how can I remove record Type that I created ......?

When I deactivate that recordType an error is fired...

This record type ReleasedType cannot be deactivated because the following profiles use this record type as default.

profile 's are...

System Administrator

StandardPlatform User

 Custom: MarketingProfile

Custom: Sales Profile 

Custom: Support Profile

Force.com - Free User

Gold Partner User

Standard User

Read Only

Solution Manager

Marketing User

Contract Manager

Potential

Silver Partner User

 

Please help me as soon as possible..

 

 

 

Thanks

asish

Rajesh SriramuluRajesh Sriramulu

Hi

 

Go to every profile which are mentioned and in record type setting make default of record type another one not  which u r going to incative or delete record type.

 

Hope this will helps u.

 

Regards,

Rajesh.

asish1989asish1989

Thanks

I have done it...