diff --git a/Default Value/Default Value.js b/Default Value/Default Value.js new file mode 100644 index 0000000000..3ca029bd5c --- /dev/null +++ b/Default Value/Default Value.js @@ -0,0 +1 @@ +javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString(); \ No newline at end of file diff --git a/Default Value/Readme.md b/Default Value/Readme.md new file mode 100644 index 0000000000..4b8653104e --- /dev/null +++ b/Default Value/Readme.md @@ -0,0 +1,3 @@ +Scenario: Clerks want to create a special handling note. As an admin, I want to limit those that can see the special handling notes to only view notes with the same Location on their user record. To do this, I added a field on the special handling note "u_location" so the form has a reference field for the signed-in user. When a new special handling note record is loaded, the field is filled in with the Location on their user record without having to use GlideAjax. Now we have a field for an ACL to reference. + +Application: Add the field, then go to the dictionary and place the @Default Value snippet in the Default Value field. Replace "u_location" with your field name. \ No newline at end of file