-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Field #1582
Set Field #1582
Conversation
Copy/paste the entire snippet.
Hi @TechnologistTim , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. However, it doesn’t comply with our contributing guidelines. As a reminder, the general requirements (as outlined in the CONTRIBUTING.md file) are the following: follow the folder+subfolder guidelines and include a readme.md file explaining what the code snippet does. Review your contribution against the guidelines and make the necessary adjustments. Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.
@@ -0,0 +1 @@ | |||
javascript: var luser = new GlideRecord("sys_user"); luser.get("sys_id", gs.getUserID()); luser.location.u_installation_id.sys_id.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call type would not be suitable in a flow action. Additionally, you should use getUniqueValue()
to get the sys_id string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works flawlessly on our production instance as is. I did mean to add this to Dynamic Filter though, not Flow Action.
@@ -0,0 +1 @@ | |||
This will populate a <u_location> field string based on the <location> field on the user's record without having to use GlideAjax. Go to the <u_location> dictionary and place this snippet in the Default Value field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid file type, u_installation_id
from the script is not documented, and this readme does not describe much at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I looked at another readme from someone else and thought I followed what they did. I'll add more detail.
As for the filetype, I followed the contribution file but for a newb like me, it doesn't provide the level of detail I need. I simply added a file as it states and typed away.
As for the field. I'm going to add in the Readme this applies to a reference field that is added. "u_installation" being the name of my particular field. The <> was an attempt to an example.
This will populate a <u_location> field string based on the field on the user's record without having to use GlideAjax. Go to the <u_location> dictionary and place this snippet in the Default Value field.