Super Clone Pro
Edit Page Custom Button

Edit functionality allows parent and child relationship records to be displayed and edited in a single page. To get started, all you need to do is create a configuration, create a custom button, and add the custom button to a page.

Custom Button

  • Enter a Label and Name
  • Set “Display Type” to “Detail Page Button”
  • Set “Behavior” to “Display in existing window without sidebar or header”

Button URL

The typical setup will reference the Super Clone Pro page, a URL parameter for the record id, and a URL parameter for the configuration name. The example below uses the URLFOR function with parameters.

{!URLFOR('/apex/lcrm_scp__scpedit', null, [rid=Opportunity.Id, cfg="opportunityConfig"])}

Additional URL parameters could be added within the URLFOR function or after. Adding them after may be more readable or flexible for long saveURL2 strings or chaining together clone actions.

{!URLFOR('/apex/lcrm_scp__scpedit', null, [rid=Opportunity.Id, cfg="opportunityConfig"])}&retURL2=%2F{!Opportunity.Parent_Opportunity__c}

URL Parameter Options

Required Parameters

  • cfg – Name given to the configuration
  • rid – Record Id of the primary object being edited

Optional Parameters – Navigation

  • retURL2 – URL encoded string that references a page to navigate to after the cancel button is pressed
  • saveURL2 – URL encoded string that references a page to navigate to after the save completes successfully
    • This overrides the “After Clone Display” setting of the configuration
    • Use this URL parameter to navigate to a page that is not an option in “After Clone Display” setting, like a custom Visualforce page or tab.

Optional Parameters – Display

  • buttonSave – Set the label of the Save button, or hide the Save button by setting the parameter to 0
    • Custom Label Example: &buttonSave=Create Renewal
    • Hide Button Example: &buttonSave=0
  • buttonCancel – Set the label of the Cancel button, or hide the Cancel button by setting the parameter to 0
    • Custom Label Example: &buttonCancel=Return
    • Hide Button Example: &buttonCancel=0
  • lss – Turn off application of Lightning Style Sheets on the Visualforce by setting the value to 0
    • Example: &lss=0
  • pricolumns – Specify a number of columns to display for the primary object.
    • Valid values include 1 to 8 columns
  • rowsperpage – Paginate rows on all levels of the hierarchy when the number of records exceed this value
  • rowsperpagel2 – Paginate rows on the 2nd level of the hierarchy when the number of records exceed this value
  • rowsperpagel3 – Paginate rows on the 3nd level of the hierarchy when the number of records exceed this value
  • rowsperpagel4 – Paginate rows on the 4nd level of the hierarchy when the number of records exceed this value
  • rowsperpagel5 – Paginate rows on the 5nd level of the hierarchy when the number of records exceed this value
  • rowsperpagel6 – Paginate rows on the 6nd level of the hierarchy when the number of records exceed this value

Optional Parameters – Processing Behavior

  • debugrollback – Add ‘debugrollback=1’ to the URL. This will cause the processing to run the insert commands to see if the transaction will run successfully, and then it will rollback the transaction to prevent the records from committing to the database.
  • norerender – Add ‘norerender=1’ to the URL, and this will cause the page to refresh entirely instead of rerendering the portion of the page that displays the data. Use this when displaying a Rich Text field to avoid the ‘Rerender is not currently supported with rich text editing enabled’ message.
  • setfieldvalues – Add ‘setfieldvalues=1’ to the URL. The Edit page’s default behavior is to ignore the configuration’s field actions that set the field values. Using this parameter will cause the field actions from the configuration to be applied when the records are loaded into the page.

Additional Information