Help setting request short description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:36 AM
Hi everyone,
I have a requirement to set the order guide request short description to include the variable answer of request_name. Currently the short description is showing the catalog item name instead. Attached is the code of the br I am using.
thanks in advance for any insight you can provide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 01:51 PM
I am glad it worked for you at sc_req_item level.
For this existing BR, on line number 9 replace if loop with following:
if(!JSUtil.nil(grRITM.cat_item.name) && grRITM.cat_item.name!='Project Management Request')
Above IF condition will make sure this BR will not update for 'Project Management Request' catalog item and for other catalog items it will continue to work as it was..
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 03:24 PM
I made the change you suggested but unfortunately I can't save the br due to a parsing error unexpected condition. Attached is the changes I made. Please let me know if you have any suggestions. Thanks again for all the feedback!
thanks
Gemma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 11:17 PM
On line number 9 at the end add {
just like previous if loop had…
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 03:45 PM
I got the script to save by making the following the change. Not sure if this is correct but regardless the same issue appears as I mentioned earlier:
The Request is not displaying correctly. The description is empty and should be the catalog item name Project Management Request Catalog, same as Request item. In addition, the request short description is displaying Project Management Request Catalog - Requested For : undefined.
The good news is short description and description on the Request Item for Project Management is correct and everything on the Request and Request item for L&D is working correctly.
Do you have any suggestions to correct this last part?
if(!JSUtil.nil(grRITM.cat_item.name) && grRITM.cat_item.name!='Project Management Request') {
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 12:43 AM
This part looks correct.
and good news is you have RITM working as per your ask.
Only the case for sc_request (request) stands, which I believe is not working because by the time BR on sc_req_item gets executed request might not be created.
So for request 's short description and description setting, I have to suggest you to handle this in workflow running on catalog item 'Project Mamangement Request' by using set value activity.
1.Open catalog item and locate the workflow name.
2. then open the workflow from workflow editor
3. check out the workflow
4. add set value activity at correct workflow stream
5. save and publish
as workflow is running for sc_req_item from there you are set request's short description and description to desired values which will also make sure that this thing will only run for 'project management request',catalog item.
Regards,Sushant Malsure