- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 01:45 AM
I need to clear all the catalog item variable values once the user clicked on addtocart. so that the item would be added to cart. next time if the user clicks addtocart button by mistake. mandatory field check error will get displayed since we are clearing the values.
Please let me know any feasibility on this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2017 05:56 AM
function onLoad() {
document.getElementById('add_to_cart_button').addEventListener("click", function(){
reloadWindow(window);
});
}
this code is working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 02:32 AM
Hi Naresh,
Can you explain exact scenario for this?
Clearing out all the variables for this catalog item would require querying the Variable Ownership table on the fly and delete the records.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 03:26 AM
Thanks for your replay.
Issue is resolved . Just I used on client script-submit : location.reload(true);
whenever user submit Add to Cart then automatically Catalog form is reloading...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 05:12 AM
Hi Naresh,
Any update on this?
Can you mark answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2017 05:56 AM
function onLoad() {
document.getElementById('add_to_cart_button').addEventListener("click", function(){
reloadWindow(window);
});
}
this code is working fine