
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
03-08-2024 02:23 AM - edited 07-22-2024 12:41 PM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
Turning the Release Testing Preview (RTP) Release Notes for the Washington DC release inside out, there was a wow moment... "Let your catalog item requesters save drafts of catalog item forms so that requesters can edit the drafts later." Saving catalog items as draft, is such an often-heard question from customers!
Since the Product documentation on this subject is limited, let's dig into how "Save as Draft" works and documenting the undocumented.
Save as Draft
Viewing a random catalog item on an out-of-the-box Employee Center (and also Service Portal), you will very quickly notice the Save as Draft feature in the Order Item Section.
Save as Draft lets a user save the Catalog Item to edit it later if they don't want to discard the form. To edit a Catalog Item saved as a draft, a user can find drafts on the Request page.
Widgets, System Properties, and Table involved
As always with new Service Portal-related features, for a good chunk of customers new features will not be visible and/or won't break. The most obvious reason would be using cloned/edited Widgets.
What artifacts are involved with Save as Draft? Viewing a Catalog Item on Employee Center the "HRM Catalog Item" Service Portal Widget is used. This Widget actually gets Widget "SC Catalog Item" [id=widget-sc-cat-item-v2], which is the same Widget used on the Service Portal.
The updated Widget first checks on if on a Catalog Item Save as Draft is enabled. For this a new field on the "sc_cat_item" table has been added, "Hide 'Save' as Draft" [no_save_as_draft]. If this field is not visible on your ServiceNow instance, this might be due to form lay-out changes in the past and this should be listed within the Skipped Updates of the Washington DC upgrade.
Within the Widget Server Script also two System Properties are checked:
- System Property "glide.sc.disable.save_as_draft" should not be "true". Out-of-the-box this System Property does not exist, so should evaluate to false.
- System Property "glide.sc.enable.save_as_draft.portal." followed by the URL suffix of the Service Portal the user is on.
If you are working on a different Service Portal, a custom Service Portal, or a Service Portal with a changed URL suffix: you can add the System Property in the format described above.
So where are the draft catalog items stored? I did see a ServiceNow Community question where one of the answers was that this is not stored(...). Of course that's not true 😂. Digging into the SC Catalog Item widget, functions from Script Include "SPCart" are called. Another part of the puzzle that got updated with the Washington DC release. Within the SPCart Script Include, several functions are performing GlideRecord queries against the Items table [sc_cart_item].
Draft catalog item
Lastly here is an example of a catalog item saved as a draft within the Items table.
And that's it, documenting the undocumented and providing a bit more technical details of what is involved with the new Save as Draft feature introduced with the Washington DC release.
---
That's it. Hope you like it. If any questions or remarks, let me know!
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
9x ServiceNow MVP
---
- 35,210 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Does anyone know, what triggers the deletion of the draft items from 'sc_cart_item' table? In my use case I'd like to actually keep the draft even if the form has been submitted. Due to the form (in my case) being extensive and huge it would be beneficial for end users not to be filling in the form all over again just because a few inputs were missed or have been raised in error. I would let the user decide if they want to delete the draft or not. This would also be useful for the case when you have to raise several requests with the exact same details but there is a single variable you have to change. Let's say you want a DEV instance and also a Prod instance, the rest of the details would be the same but they need to be raised separately..
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sarah Travis1, did you find the solution for clearing of values on the request record when saved as draft?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I have a question:
For example if end users have some drafts and after some time developer changes the catalog item and drafts will be lost since the version of catalog item changed.
Will it be the same issue with changing the flow action that is associated with the catalog item?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
We just learned the hard way that updating a form will invalidate/delete all users current draft of that form.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ebarrette Yeah unfortunately every user who is having the data Will lose it.
We also got the issue you mentioned so that what we have done is that We contacted ServiceNow through HI Ticket and they have given temp instances to get the data back.
Thanks and Regards
Sai Venkatesh
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Is this available out of the box on record creator?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@NewToSnowNow yes, read the post
- « Previous
-
- 1
- 2
- Next »