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
‎04-17-2022 12:24 PM
Hi there,
one option to do it is to create the QRCode raw data on the server and then convert it directly into html and then create a PDF based on html which would then be stored as an attachment to the record.
Check this out:
The DevTools app contains a truckload of reusable scripts and
features to support your app development.
Fork at will!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2022 01:47 PM
Hey Sascha, I have tried to run your code but getting a lot of errors such as:
"GetIntegerValue" not defined
"GetStringValue" not defined
"Clone" not defined
Please advise.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 01:43 AM
Sounds like you did not install DevTools.
Two options:
1. Install DevTools (recommended)
2. Add the mentioned functions manually - and then add more functions on which these functions depend on manually. This is quite same manual work and you won't benefit from DevTools updates and bugfixes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2022 04:52 AM
Any updates on this requirement?? facing exactly the same problem, able to generate the QR code but not able to save the image automatically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2022 12:24 PM