- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 05:55 AM
How can I empty the "Requested For" by default in Helsinki? This was working in Geneva until I changed the Service Catalog Properties to Use the sc_layout driven cart macros
The onload client script doesn't work anymore.
function onLoad() {
g_form.clearValue('requested_for');
}
Thanks.
Jocelyn
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 07:12 AM
Here's what I found... it's set by the UI macro sc_cart_view_requested_for.
This is added to the cart layout record: Shopping Cart (target: Cart Preview Screen (two step)). Since you cannot modify the original UI macro, you can copy it, update the copy so it does not set the variable (see lines 8 and 9 in the macro), then replace the usage of the macro in the cart layout's related list with your new one.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:28 AM
I wouldn't bother with a client script really - especially one that uses DOM manipulation (document.getElementByid calls). Too risky of not working in future releases.
I'd set the default value to nothing and ensure the field is mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 06:59 AM
I did the same thing you did and also updated the default value of the sc_request.requested_for field, yet this still comes up with the current user's name. I don't have an answer for you at the moment, but will check in to this further and let you know what I find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 07:01 AM
Thanks Chuck!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 07:12 AM
Here's what I found... it's set by the UI macro sc_cart_view_requested_for.
This is added to the cart layout record: Shopping Cart (target: Cart Preview Screen (two step)). Since you cannot modify the original UI macro, you can copy it, update the copy so it does not set the variable (see lines 8 and 9 in the macro), then replace the usage of the macro in the cart layout's related list with your new one.