Difference between revisions of "Use a Button to Create a Level 1"
From SmartWiki
Line 24: | Line 24: | ||
* the other parameters should be left exactly as shown: | * the other parameters should be left exactly as shown: | ||
:*''opportunityid=0'' will create a new, blank {{l1}} record | :*''opportunityid=0'' will create a new, blank {{l1}} record | ||
+ | * other parameters than can be used include ''defaultownerid'' which will set the [[owner]] of the new record to the [[contact]] whose [[userid]] matches the specified ''defaultownerid''. | ||
This {{ROSV}} field can then be referenced in a [[list view]]: | This {{ROSV}} field can then be referenced in a [[list view]]: |
Revision as of 11:41, 4 August 2014
This feature uses JavaScript syntax |
System Administrators can create a button that will allow users to create Level 1 records on the fly.
Steps:
- Create a custom field of type Read Only – System Variables
- In the Variables section, enter the following:
<script language=javascript> function createNewLevel1(){ location.href="/Apps/app_editopportunity.jsp?appid=12345&nextlevel=1&opportunityid=0&defaultstatusid=52525&opportunitytypeid=121212"; } </script> <input type="button" class=Button value="Button Label" onClick="createNewLevel1()">
where:
- appid = the application ID of the in which the Level 1 should be created
- defaultstatusid = the status ID to which the new record should be set. If this parameter is omitted the default status will be used.
- opportunitytypeid = the Template ID with which the new record should be associated. If this parameter is omitted the default template will be used
- Button Label should be the text that should show on the button (e.g., "Create New Grant")
- the other parameters should be left exactly as shown:
- opportunityid=0 will create a new, blank Level 1 record
- other parameters than can be used include defaultownerid which will set the owner of the new record to the contact whose userid matches the specified defaultownerid.
This Read Only – System Variables field can then be referenced in a list view:
...on reports...
...or on another Level 1 record: