How to save a QR Code to an image field via a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2019 06:41 AM
Hi All,
I have implemented the project from the ServiceNow share at the below link and am able to create a QR code that behaves as I need it to:
https://developer.servicenow.com/app.do#!/share/contents/5194766_task_qr_code?v=1&t=PRODUCT_DETAILS
However, my full requirement is to create a QR code upon creation of a record and save that code to an image field on said record automatically.
The above project utilises a UI action to trigger the creation and a UI page to display the resulting QR Code, however, despite some extensive digging, I have been unable to find a way to find a way to create the image and save it to an image field automatically, for instance, using a Business Rule .
If anyone could assist me and/or point me in the right direction, it would be much appreciated.
Many Thanks,
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 03:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2019 03:30 AM
you can convert the file into image type on your ui page script. and then in UI Page client script you can set that image into the image type field.
use the below link for reference.
https://stackoverflow.com/questions/18207328/how-can-i-save-a-qrcode-image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2019 06:14 AM
Hi Harshvardhan/Naveen,
Thanks for your input, and apologies, I should have been clearer!
What I am really trying to achieve is for the QR code to be generated and added to the record in an image field automatically.
So ideally, I wouldn't use a UI Page or UI Action.
I would envisage a Business Rule triggering on Insert calling the UI script from the above mentioned project to generate the QR Code and then saving the file to the image field on the newly created record, but I've been unable to find a way to do this as yet!
I've amended the original post to a more accurate description.
Thanks again,
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2021 12:48 AM
Hello Jason,
Did you find any solution to save the QR code as an Image?
Thanks,
Faizeal.