- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2020 09:15 AM
Hello everyone,
I am working on an app in Mobile Agent.
I have an Action Function called New Service Request, that allows the users to create new records. The function is set to "Allow Images Upload". It works in a sense that the '+' sign does appear on the form and after choosing or taking a photo, the photo pops up on the right side of the '+' sign.
However, when I tap submit, and then view the records list using Mobile Agent, the record is there, but the image is not. I also check the sys_attachment table, and the image I uploaded does not appear in there either.
How does attachment upload work, and how does it get stored in the app?
Any help would be appreciated!
Solved! Go to Solution.
- Labels:
-
Agent Mobile App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2020 08:58 AM
I wanted to add a real resolution to this issue since the link given is broken and I have also been struggling with this.
Image upload only works if the Table field is set, and the Table field is only visible if the context is set to Record.
In the sys_sg_button table where you created the function and selected "Allow images upload", you must change the function context to "Record" and then set the Table to Incident or whichever table you are using. Save the record. Then change the context back to "Global" and save again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2020 04:49 PM
For the function configuration, please make sure that the table in the display condition section is selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 07:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2021 04:43 PM
Hey David,
I will test your approach when I get a chance. The SNow team is now working on fixing an internal bug on the Quick Action that is used to upload images. For some reason, the quick action stopped working due to a bug in the system, and the development team in Service Now is trying to solve it. Once it is functional and I can test it, I will let you know if your suggestion does the trick, and mark your answer as the correct one.
I have the image upload functionality working now (before the quick action broke), and this is what I have changed to make it work. Unfortunately I don't remember exactly whether this trick was the solution of the problem, but I will share it with everyone so you can try it as well.
Basically, in the applet that is supposed to show the images, go to the details screen (under the Form Screen Segments).
Then click on the field (or create a new one) that is supposed to contain the images/attachments.
Then, make sure the Record Id Field is Sys ID. This is how the sys_attachment's table connects to your application's records. So we are telling the sys_attachments table to use the Sys ID of the record which needs its images to be displayed. I used to have something different for this field instead of the Sys ID, but once I figured out how the sys_attachment stores images (by using the table id of your application and the Sys ID of the record to which the image belongs to), I changed this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 09:13 AM
Hello Narek,
You are facing known error reported in following article, Please follow the workaround mentioned in this article
https://hi.service-now.com/kb_view.do?sysparm_article=KB0752097
I enabled "Allow Images upload" in my instance for Add Comments button [More option button] available for incident applets and its working as expected
https://<yourinstance>.service-now.com/nav_to.do?uri=sys_sg_button.do?sys_id=a905cca767302300b270c3105685ef0a
Give a try in this OOB applet button (sys_sg_button) and if its working there, compare you custom sys_sg_button with the OOB one which might help you to identify the missing peace.
Regards,
JAS