Changes

Jump to: navigation, search

Use a Button to Create a Level 1

1,575 bytes added, 20:22, 2 January 2014
Created page with 'System Administrators can create a button that will allow users to create {{l1}} records on the fly. Steps: * Create a custom field of type {{ROSV}} * In the ''Variables'' …'
[[System Administrator]]s can create a button that will allow users to create {{l1}} records on the fly.

Steps:
* Create a custom field of type {{ROSV}}
* In the ''Variables'' section, enter the following:
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;"><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()">
</pre>

'''where''':
* ''appid'' = the [[application ID]] of the {{UTA}} in which the {{l1}} should be created
* ''defaultstatusid'' = the [[status ID]] to which the new record should be set
* ''opportunitytypeid'' = the [[Determining the typeid|Template ID]] with which the new record should be associated
* ''Button Label'' should be the text that should show on the button (e.g., "Create New Activity")
* the other fields should be left exactly as shown:
:*''opportunityid=0'' will create a new, blank {{l1}} record

This {{ROSV}} field can then be referenced in a [[list view]]:

[[Image:CreateNewActivityButtonOnListView.png|link=|600px]]

...on reports...

[[Image:CreateNewActivityButtonOnReport.png|link=|600px]]

...or on another {{l1}} record:

[[Image:CreateNewActivityButtonOnRecord.png|link=|600px]]

==See Also==
* [[Adding a Button that Runs a JavaScript]]
* [[Use a Button to Create a Level 2]]

[[Category:JavaScript]]
8,849
edits

Navigation menu