Use a Button to Create a Level 2

From SmartWiki
Jump to: navigation, search
This feature uses JavaScript syntax
Text code javascript.gif

System Administrators can create a button that will allow users to create Level 2 records on the fly.

Steps:

<script language=javascript>
function createNewLevel2(){
location.href="/Apps/app_editevent.jsp?appid=@apptype@&islevel2=1&objecttype=23&nextlevel=1&companyid=@companyid@&objectid=@opportunityid@&eventid=0";
}
</script>
<input type="button" class=Button value="Button Label" onClick="createNewLevel2()">

where:

  • appid = the application ID of the in which the Level 2 should be created
  • Button Label should be the text that should show on the button (e.g., "Create New Activity")
  • the other parameters should be left exactly as shown:
  • companyid=@companyid@ will associate the organization associated with the Level 1 record on which the button was pressed with the new Level 2 record
  • objectid=@opportunityid@ will link the new Level 2 record to the Level 1 record on which the button was pressed
  • eventid=0 will create a new, blank Level 2 record

other parameters that can be included:

  • defaultstatusid = the status ID to which the new record should be set. If this parameter is omitted the default status will be used.
  • eventtypeid = the Type ID with which the new record should be associated. If this parameter is omitted the default type will be used.

This Read Only – System Variables field can then be referenced in a list view:

CreateNewActivityButtonOnListView.png

...on reports...

CreateNewActivityButtonOnReport.png

...or on the Level 1 record itself:

CreateNewActivityButtonOnRecord.png

See Also