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.