File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
Client-Side Components/UI Pages/Edit Last WorkNotes Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 1- //Enable client set to true
2- //Enter Onclick value as function name openEditLastCommentModal()
3- //Enter form button as true
1+ /**
2+ * Opens a modal to edit the last Work Notes or Additional Comments.
3+ *
4+ * @description
5+ * This function is triggered by a form button (set to true),
6+ * with client-side execution enabled. It opens a GlideModal
7+ * using the UI macro "edit_worknotes_comments_inc" and sets
8+ * the current incident sys_id as a preference for use within the modal.
9+ *
10+ * Usage:
11+ * - Set Client = true
12+ * - Set OnClick = openEditLastCommentModal()
13+ * - Set Form Button = true
14+ */
415function openEditLastCommentModal ( ) {
16+ // Create and configure the GlideModal
517 var dialog = new GlideModal ( "edit_worknotes_comments_inc" ) ;
6- dialog . setTitle ( 'Edit Last WorkNotes/Additional Comments' ) ;
7- dialog . setPreference ( 'incid' , g_form . getUniqueValue ( ) ) ;
18+ dialog . setTitle ( "Edit Last WorkNotes/Additional Comments" ) ;
19+
20+ // Pass the current record's sys_id to the modal
21+ dialog . setPreference ( "incid" , g_form . getUniqueValue ( ) ) ;
22+
23+ // Optional: Adjust modal width
824 dialog . setWidth ( 550 ) ;
25+
26+ // Render the modal
927 dialog . render ( ) ;
1028}
You can’t perform that action at this time.
0 commit comments