Skip to content

Br attachment variable #1097

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

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//Run this Business Rule async Insert on the sc_req_item table if using the attachment type variable in a Catalog Item
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord("sys_attachment");
gr.addQuery("table_name", "ZZ_YY" + current.getTableName());
gr.addQuery("table_sys_id", current.sys_id);
gr.query();
while (gr.next()) {
gr.table_name = current.getTableName();
gr.update();

}
})(current, previous);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When attaching a file via an attachment type variable, on the target record the attachment appears in the Activity Stream instead of at the top associated with the paper clip icon, where one typically looks for / notices attachments. This Business Rule will convert the entry in the sys_attachment table so that the attachment added via an attachment type variable appears at the top of the record, associated with the paper clip icon.
Loading