Activity Forums Salesforce® Discussions How can we specify the action on URLFOR in apex in salesforce?

  • sushant

    Member
    January 11, 2017 at 2:25 pm

    Hi Mohit,

    The $Action global variable allows you to dynamically reference valid actions on an object type, or on a specific record. The most likely way to make use of this is to create a URL to perform that action.
    For example, you can use the expression {!URLFOR($Action[objectName].New)} in an <apex:outputLink>, with a controller method getObjectName() that provides the name of the sObject.

    Follow this link for more info:

    https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_globals_action.htm

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos