- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 05:39 AM
Hi,
I need to add assignment group field in Transfer order line task form and i need to auto populate that assignment group value with the transfer order form of "To stockroom " assignment group value.
Please help me .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 08:00 PM
Hi @bhargavi143
You can put a Try Catch in the function to see whether it's able to catch the error or not. Use gs.info() to log the system log.
Something like this.
findAndCreateTask: function(modelCategorySysId, stage) {
try {
var transferOrderLine = current.sys_id;
var transferOrder = current.transfer_order;
var modelCategoryGR = this.findModelCategory(modelCategorySysId, stage);
// Create task for the found model category
if (!gs.nil(modelCategoryGR.getUniqueValue())){
this.createTask(modelCategoryGR, transferOrderLine, transferOrder);
}
} catch (e) {
gs.info('findAndCreateTask - error: ' + e);
}
},
If it still not prints any error, you can mark a breakpoint there and open the Script Debugger tab.
Start Debugging and you will see all the output in details steps by steps.
After all, if it's still blocked you to figure out the root cause, just simply use the first approach instead => Perform the second update with an Async Business Rule.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 05:51 AM
Hi Tai,
I changed the above mentioned line but no luck
Tasks are not generated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 06:45 AM
Hi @bhargavi143
There might be a conflict somewhere in your instance.
I've copied 2 functions from your script and corrected the wrong line. Then, everything goes well with me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 03:15 AM
Hi Tai,
Thanks for replying.
How to find if any conflict is present in my instance. If i need to change any order for any scripts to solve this issue.
Thanks
Bhargavi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 08:00 PM
Hi @bhargavi143
You can put a Try Catch in the function to see whether it's able to catch the error or not. Use gs.info() to log the system log.
Something like this.
findAndCreateTask: function(modelCategorySysId, stage) {
try {
var transferOrderLine = current.sys_id;
var transferOrder = current.transfer_order;
var modelCategoryGR = this.findModelCategory(modelCategorySysId, stage);
// Create task for the found model category
if (!gs.nil(modelCategoryGR.getUniqueValue())){
this.createTask(modelCategoryGR, transferOrderLine, transferOrder);
}
} catch (e) {
gs.info('findAndCreateTask - error: ' + e);
}
},
If it still not prints any error, you can mark a breakpoint there and open the Script Debugger tab.
Start Debugging and you will see all the output in details steps by steps.
After all, if it's still blocked you to figure out the root cause, just simply use the first approach instead => Perform the second update with an Async Business Rule.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 03:59 AM
Thank you so much , Your solution is working for me.