Add the Widget 'Ticket Attachment' in the Order Guide page

rajalakshmi12
Mega Expert

Hi All,

I was trying to add the OOB widget 'Ticket Attachment' in my Order Guide page. But the attachment gets attached on the Order Guide rather than the Request item which will be created on submit.

To precise, we need the attachment option on Order Guide page, but to be mapped on the Request Item record(which will be created after submitting).

Example :

Page : sc_cat_item_guide

Can anyone help me on what values to be defined for ''Record ID" & "Record Table" on widget instance options on the code as per the above requirement?

6 REPLIES 6

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,



Sadly that Widget isn't really usable for order guides. That widget only works on pages that is showing an existing record, like page ticket etc. If you for example go to the page that shows the record producer, you can see that it doesn't use the widget, but that attachment part is integrated in the widget showing the record producer/catalog item.



This is mainly because how the Portal handles attachments.



If you look at a existing record like Incident, the attachment is connected to the incident it self and the widget you talking about is showing it and used to administrate the attachments.



Now when you look at the page for record producers and catalog items (and order guides but it doesn't have attachments) it has the attachment code within the widget that shows the producer/item. And here is the big different, if a use uploads a attachment, it attached to the table "sp_portal" and when you then submit, it will change to the correct one.



I have made a prototype for handling order guide and attachments and if you want, I can see if I can find it again.


Hi Goran Lundqvist,



Thanks a lot for your reply. That completes my understanding. If you could help us with the prototype or the idea of implementing it & the respective changes to be made, that would be greatful.



Thank you,


Raji.


Here is the widget. It was made for pre jakarta, so it that's why some things using spAriaUtil is commented out. And as it's now, the attachment ends up on the request itself.


Thanks a lot Goran