2

I have two custom objects:

**Cov__c** 
Risk__c: Picklist (Terr, Prop)

**Add__c**
Cov__c (Master Detail Lookup)

I have created a detail button for Add__c, which I want to make visible on the related list on the Cov__c detail page.

When the picklistfield Risk__c is set to Terr, I want to open a specific page layout/record type called Terr_RT.

This is what I have written on the detail button:

{!IF( ISPICKVAL(Cov__c.Risk__c,'Terr'), '/a0Z/e?ent=01I180000004KaV&RecordType=012180000008Tw5, '/a0Z/e?ent=01I180000004KaV&RecordType=012180000008Tw0')}

How can I avoid hardcoding the record type? ...and is there a better way of doing this?

Tia.

0

An alternate option would be to create a Publisher Action for that Record Type to be displayed on Cov__c's detail page. I'm assuming the button displays all the time just like a Publisher Action button does unless you have custom code to only show it under certain circumstances.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.