Open insomniacc opened 1 year ago
If using New-SNOWApprover as shown: New-SNOWApprover -sysapproval "d2cdb552db252200a6a2b31be0b8f5ee" -document_id "d2cdb552db252200a6a2b31be0b8f5ee" -approver "1b3f2d6047292110d3e5fa8bd36d4351" -state "Requested" -due_date "2023-09-16 13:15:03" -source_table "change_request" -verbose -passthru
New-SNOWApprover -sysapproval "d2cdb552db252200a6a2b31be0b8f5ee" -document_id "d2cdb552db252200a6a2b31be0b8f5ee" -approver "1b3f2d6047292110d3e5fa8bd36d4351" -state "Requested" -due_date "2023-09-16 13:15:03" -source_table "change_request" -verbose -passthru
There's an object created, due date, state & source table are set correctly, however the reference fields for document_id and approver are blank.
Same behaviour here noticed in this thread: https://www.servicenow.com/community/developer-forum/adding-approvers-to-an-open-change-request-via-rest-api/m-p/1398754
I'll leave this out for now, typically approvals will be generated via workflows internally anyway rather than externally via rest, the main function here is the Set-SNOWApprover which will allow external approvals to be updated.
If using New-SNOWApprover as shown:
New-SNOWApprover -sysapproval "d2cdb552db252200a6a2b31be0b8f5ee" -document_id "d2cdb552db252200a6a2b31be0b8f5ee" -approver "1b3f2d6047292110d3e5fa8bd36d4351" -state "Requested" -due_date "2023-09-16 13:15:03" -source_table "change_request" -verbose -passthru
There's an object created, due date, state & source table are set correctly, however the reference fields for document_id and approver are blank.
Same behaviour here noticed in this thread: https://www.servicenow.com/community/developer-forum/adding-approvers-to-an-open-change-request-via-rest-api/m-p/1398754
I'll leave this out for now, typically approvals will be generated via workflows internally anyway rather than externally via rest, the main function here is the Set-SNOWApprover which will allow external approvals to be updated.