1

On case, I did create a VF page to override the "Edit" standard button provided by Salesforce. I need to redirect it based on the record type of the record for which the edit is clicked. In the below code, if the record type matched, it is redirecting to a VF page and an Id is passed as parameter.

Issue: If the record type doesn't match, my guess is that it should take the page to standard edit page. But I am seeing the error (attached). Please let me know if I am doing anything wrong.

enter image description here

enter image description here

1 Answer 1

1

Off of the top of my head, I suspect that null should be Case.Id instead, and you need the override parameter to prevent infinite recursion:

action="{!URLFOR(CASE(Case.RecordType.Name, 'Embrel Support Program', $Action.Case.Edit,
    Case.Id, [id=Case.Id], true))}"

Some actions require the record Id of the record to edit. Technically, passing the id parameter to the case edit action may also contribute to the problem, so you might be better off using two different URLFOR:

action="{!IF(Case.RecordType.Name='Embrel Support Program',URLFOR(...),URLFOR(...))}"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .