invite supplier contact in supplier lifecycle management is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 01:17 PM
We are trying to work through a supplier lifecycle proof of concept with our supplier manager in a PDI.
running glide-vancouver-07-06-2023__patch9-05-02-2024
When we get to the invite supplier contact step in the playbook the action errors. The script that is failing is below. It appears that supplierCommonUtil.requestNewSupplierContact(userFieldValues); is not returning a contact request. The Error is "Error: Cannot read property "sys_id" from null,Detail: Cannot read property "sys_id" from null"
(
function execute(inputs, outputs) {
var userFieldValues = {
first_name: inputs.first_name,
last_name: inputs.last_name,
title: inputs.title,
email: inputs.email,
supplier: inputs.supplier,
is_primary_contact: true
};
var supplierCommonUtil = new sn_slm.SupplierCommonUtil();
var newContactRequest = supplierCommonUtil.requestNewSupplierContact(userFieldValues);
outputs.case_sys_id = newContactRequest.sys_id;
})(inputs, outputs);
This can further be reproduced by running this background script.
Run this script (with a valid supplier id)
var userFieldValues = {
first_name: 'first',
last_name: 'last',
title: 'cio',
email: 'example@example.com',
supplier: 'a93c42bb83c1121040f561e0deaad3e2',
is_primary_contact: true
};
var supplierCommonUtil = new sn_slm.SupplierCommonUtil();
var newContactRequest = supplierCommonUtil.requestNewSupplierContact(userFieldValues);
var case_sys_id = newContactRequest.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:20 PM
Hello @jonathandrury
This question can be best answered by the Supplier Lifecycle Management team in the Source-To-Pay product community site. Please ask your question on their forum here: https://www.servicenow.com/community/source-to-pay-operations/ct-p/source-2-pay-operations
Thank you.