Showing results for 
Search instead for 
Did you mean: 

Display a particular Edit screen from a VF page

Grill Chef
Grill Chef

Display a particular Edit screen from a VF page

I need to prevent edit on the work Detail for everyone except Admin and am trying to create a VF page that will allow Edit screen to be displayed only for the administrator but will just show a message for anyone else.

The following works except the edit page displayed is not the correct one. How can I determine what should be put here to display the correct one via the Action?

<apex:page standardController="SVMXC__Service_Order_Line__c" action="{!if($Profile.Name <> 'Custom System Administrator', Null, urlFor($Action.SVMXC__Service_Order_Line__c.Edit,

$ObjectType.SVMXC__Service_Order_Line__c, null, true))}">


  This link is disabled. Work Details may only be changed via SFM. Select the Line Number to view the Work Detail.