- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2026 10:35 PM
Hey @Alon Grod
Business Rule runs server-side, it cannot directly determine whether a field or Record Producer variable was visible on the user's form.you can use client side APIs g_form.isVisible()
For task fields using current.getElements() and the Record Producer variables using:
var variables = current.variables.getElements();
for (var i = 0; i < variables.length; i++) {
gs.info(variables[i].getLabel() + ' = ' + variables[i].getValue());
}
For PDF to contain exactly what was visible to the user at submission time, the better approach is to capture the visible fields/variables on the client side and store them .
Then the Business Rule can read that data, generate the PDF, and attach it to the task.
*************************************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2026 10:52 PM
Hi,
What's the use of a PDF containing all the visible fields on the form ?
All the data is already there, visible on the form, then why the PDF ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2026 11:31 PM
Yes, it’s possible, but a Business Rule can’t directly know the client-side visibility of fields. You can use GlideRecord and dictionary metadata for fields, and access the record producer variables separately.
I’d recommend having the Business Rule call a Script Include that collects the required label/value pairs, generates the PDF, and attaches it with GlideSysAttachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2026 11:33 PM
Yes, but not directly from a Business Rule. A Business Rule can read the record fields and variable values, but the form/UI controls visibility. You’ll need to reproduce the visibility logic server-side or use a suitable PDF/reporting approach to generate the attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2026 12:06 AM
what's the business requirement here?
In server side you won't know which variables are visible or not.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏