AnsweredAssumed Answered

Add Attachments button function to Status Update form

Question asked by J_W on Oct 5, 2017
Latest reply on Oct 5, 2017 by Jon_Israel

SDM 14.1.02 and 14.1.03

 

We want to streamline some functions that are now on multiple forms\menus.  When an analyst does a Status Update then they need to Add Attachments and then send a Manual Notify.

 

I am trying to trace back the Add Attachments button on the Attachments tab from detail_cr.htmpl to the xx_attmnt_tab.htmpl so I can copy this to the request_status_change.htmpl.

 

The issue is that once I get the Attach Document button on the form and its do_attach_doc() function, it displays the upload form when selected, but the results are not saved to the list of attachments on the Request itself. 

 

I need help in determining which variables to pass to Status Update from the Request so that when the do_attach_doc() function is called, it will link the attachment to the Request.  It appears I need to pass the persistent_id of the cr. but this is already available in the request_status_change form.

 

function do_attach_doc() {
   var add_file_src = "View=Upload+ShowFields=Yes+ShowImgStatus=Yes+ShowRepList=Yes+RepType=0+KEEP.POPUP_NAME=" + top.name +
                      "+KEEP.PARENT_DIV=" + window.frameElement.parentNode.id + "+KEEP.attmnt_parent=$args.persistent_id";
   AddFile(0, 0, 0, add_file_src, 50 );
}

 

Although the requirement is only to add the Add Document button; I think they will come back later and ask that the entire Attachments notebook tab be added to the bottom of the Status Update form.  Please let me know if anyone has already completed this modification.

 

TIA,

 

J.W.

Outcomes