cancel
Showing results for 
Search instead for 
Did you mean: 

Approve a document via Service Layer - SAP B1

claudiocalabresi
Explorer
0 Kudos
817

Dear Expert,

I need to approve a document via Service Layer.
The API call below allows me to approve a document using the user currently logged-in (the user of the current Service Layer session).

PATCH https://myhost:50000/b1s/v1/ApprovalRequests(1)

{
"ApprovalRequestDecisions": [
{
"Status": "ardApproved",
"Remarks": "Approved - OK"
}
]
}

How can I approve a document assigned to another user please?
Where can I find documentation for the ApprovalRequestDecisions API call please?

I'm using FP2202 HF1.

Thank you,
Best Regards,
Claudio

View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi claudiocalabresi,

Use ApproverUserName and ApproverPassword for the same.

{
    "ApprovalRequestDecisions": [
        {
            "Status": "ardApproved",
            "ApproverUserName": "User1",
            "ApproverPassword": "User1Password",
            "Remarks": "Approved - OK"
        }
    ]
}

 

 

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

claudiocalabresi
Explorer
0 Kudos
Hi Ankit, Thank you for your reply. Unfortunately I do not have access to the ApproverPassword. The OUSR table holds the encrypted version. Is there a workaround please? Additionally, could you provide the API body format when the 'SAP Business One Authentication Server' identity provider is enabled please? Thank you again, Kind Regards, Claudio
SistemasTOF
Explorer
0 Kudos
Hi! Is there a way to update the main "Remarks" field (OWDD."Remarks")? The "ApprovalRequestDecisions" method defines a "Remark" for the approval team, but how can I set the "Remark" for the requester? I used the PATCH https://localhost:50000/b1s/v1/ApprovalRequests(123) { "ApprovalRequestLines": [ { "StageCode": 3, "Status": "ardPending", "UserID": 1 } ], "CurrentStage": 3, "IsDraft": "Y", "ObjectEntry": 14, "ObjectType": "112", "OriginatorID": 38, "Remarks": "Please Approve, dear Master", "Status": "arsPending" } , but is not working, any ideas? Regards!