- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 02:09 AM - edited 08-26-2024 02:09 AM
Hi, I have a Catalog Item, in which I have a flow attached. The flow has trigger "Service Catalog" and then action to create SC_task.
Now, I have created a UI action on the incident table to create a requested item with below code but sc_task is not getting created:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 02:37 AM
Potential Causes and Solutions:
Flow Trigger Conditions:
- Verify Trigger Conditions: Ensure that the flow's trigger conditions are met when the RITM is created. These might include specific item fields or states.
- Debug the Flow: Use the Flow Designer's debugging tools to step through the flow and identify any issues.
Flow Action Configuration:
- Check Action Settings: Verify that the action to create the SC_task is configured correctly. Ensure the correct target table (sc_task), fields, and values are specified.
- Test the Action: Run the flow manually with test data to isolate any issues with the action itself.
Item Field Dependencies:
- Review Field Dependencies: If the SC_task creation depends on specific item fields, ensure those fields are populated correctly when the RITM is created.
- Update Field Values: If necessary, update the field values in your UI action code to match the required conditions.
Flow Script Issues:
- Inspect Script Logic: If the flow uses script to create the SC_task, review the script for errors or logic flaws.
- Test Script Separately: Create a script include to test the script logic independently.
Service Catalog Settings:
- Check Catalog Settings: Verify that the catalog item's settings are correct, especially if there are any custom options or restrictions that might affect flow execution.
Alternative Approach: Another option could be to use the Cart API, which is more in line with how Service Catalog items are typically created, as it handles the entire request and fulfillment process.
var cart = new Cart();
var item = cart.addItem('869079844750521084927bb4416d43ac'); // Catalog item sys_id
cart.setVariable(item, 'variable_name', 'value');
var request = cart.placeOrder();
action.openGlideRecord(request.request_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 02:37 AM
Potential Causes and Solutions:
Flow Trigger Conditions:
- Verify Trigger Conditions: Ensure that the flow's trigger conditions are met when the RITM is created. These might include specific item fields or states.
- Debug the Flow: Use the Flow Designer's debugging tools to step through the flow and identify any issues.
Flow Action Configuration:
- Check Action Settings: Verify that the action to create the SC_task is configured correctly. Ensure the correct target table (sc_task), fields, and values are specified.
- Test the Action: Run the flow manually with test data to isolate any issues with the action itself.
Item Field Dependencies:
- Review Field Dependencies: If the SC_task creation depends on specific item fields, ensure those fields are populated correctly when the RITM is created.
- Update Field Values: If necessary, update the field values in your UI action code to match the required conditions.
Flow Script Issues:
- Inspect Script Logic: If the flow uses script to create the SC_task, review the script for errors or logic flaws.
- Test Script Separately: Create a script include to test the script logic independently.
Service Catalog Settings:
- Check Catalog Settings: Verify that the catalog item's settings are correct, especially if there are any custom options or restrictions that might affect flow execution.
Alternative Approach: Another option could be to use the Cart API, which is more in line with how Service Catalog items are typically created, as it handles the entire request and fulfillment process.
var cart = new Cart();
var item = cart.addItem('869079844750521084927bb4416d43ac'); // Catalog item sys_id
cart.setVariable(item, 'variable_name', 'value');
var request = cart.placeOrder();
action.openGlideRecord(request.request_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 04:06 AM
cart API was helpful for my requirement. Thank you so much