- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 03:42 PM
Hi gang,
I'm building an order guide for a client, and am setting up rule bases for the catalog items and am creating item variable assignments to set the value of a couple fields...one field is working (a select box type variable), and one is not. The one that is not working is a reference field...but not sure why that might be an issue. In the rule base I am able to set the Value of the reference field on the catalog item variable through the item variable assignment...but it's not working? Any thoughts? Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 05:07 PM
and figured it out...there was another onLoad catalog client script blocking the item variable assignment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 03:55 PM
upon further investigation...the both the variables I'm trying set values for through the rule base are part of a variable set, and there is an onLoad catalog client script that is also setting the value of the field that is not working according to the URL...I'm thinking this might be the issue...would this catalog client script override the rule base if the item is shown in an order guide?
Here's the catalog client script:
function onLoad() {
//Type appropriate comment here, and begin script below
var url = ""+window.location;
var ind = url.indexOf('sysparm_app');
if(ind>-1){
g_form.setValue('item_choice',''+url.substring(ind+12,ind+32+12))
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 04:15 PM
hmmm...actually no, that didn't fix it...I deactivated that client script and the reference field on the catalog item is still not being set by the item variable assignment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2018 05:07 PM
and figured it out...there was another onLoad catalog client script blocking the item variable assignment