How to use submitter department in purchase order approval condition
Summary:
Content (required):
I'm trying to use purchase order submitter's department in purchase order approval condition (BPM task DocumentApproval). Finally I assigned a department to my user and I created the simple conditions in BPM to check if submitter's department contains value:
Rule 1:
IF PurchasingDocumentHeader.submitterDepartmentId is null
THEN auto approve
Rule 2:
IF PurchasingDocumentHeader.submitterDepartmentId isn't null
THEN auto reject
When tested the Rule 1 was applied and purchase order was automatically approved. So PurchasingDocumentHeader.submitterDepartmentId is null apparently.
The same happened when using PurchasingDocumentHeader.buyerDepartmentId.
I also tried GetPurchasingDocumentHeaderResponse.result.submitterDepartmentId and GetPurchasingDocumentHeaderResponse.result.buyerDepartmentId but approval finished with error "The approval history can't be displayed because this task couldn't be assigned to any approver."