- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2024 07:14 AM
Noticed with the following script it is filling out the variable but creating its own choice on the sctask level instead of using the existing variable choice:
EX:
Script:
try{ //DO NOT TOUCH
var cartId = GlideGuid.generate(null); //CartID Generates //DO NOT TOUCH
var cart = new Cart(cartId); //Creates New Cart //DO NOT TOUCH
//add your requested item to the cart by sys_id of the catalog item //DO NOT TOUCH
var item = cart.addItem('7893bd301b90f110e010dd3bdc4bcbca', 1); //Adds Facility Request Catalog //DO NOT TOUCH
//populates variable on catalog to submit
var category = gs.info(current.u_category);
cart.setVariable(item, 'category', current.u_category);
var rc = cart.placeOrder(); //Places Order //DO NOT TOUCH
gs.info(rc.number); //DO NOT TOUCH
}//DO NOT TOUCH
catch(ex){//DO NOT TOUCH
gs.info(ex);//DO NOT TOUCH
}//DO NOT TOUCH
//end
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2024 10:09 AM
Have you made sure the actual value (not label, Name,...) stored in u_category (looks like it's 'home office') exactly matches (space and case-sensitive) the select box variable Value (not the Text label)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2024 10:09 AM
Have you made sure the actual value (not label, Name,...) stored in u_category (looks like it's 'home office') exactly matches (space and case-sensitive) the select box variable Value (not the Text label)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2024 10:10 AM
This was exactly what it was the field value were missing _'s