ProcCategoryPolicyParameter::getPermittedCategoriesForVendor Method
Gets all of the procurement categories that a user is allowed, by the category policy, to buy in and from the given vendor.
Syntax
client server public static Set getPermittedCategoriesForVendor(
RefRecId _vendorCompany,
AccountNum _vendorAccount,
RefRecId _ou)
Run On
Called
Parameters
- _vendorCompany
Type: RefRecId Extended Data Type
The record ID of a CompanyInfo record that represents the data area of the given vendor and the legal entity in which to find the category policy.
- _vendorAccount
Type: AccountNum Extended Data Type
A vendor account number.
- _ou
Type: RefRecId Extended Data Type
A RefRecId value that denotes the operating unit in which to find the category policy.
Return Value
Type: Set Class
A set of record IDs, where each is for a procurement EcoResCategory value.
Remarks
This method retrieves all procurement categories that are permitted by the ProcCategoryPolicyParameter to allow the given vendor.
In essence, each such category either does not exist in the ProcCategoryPolicyParameter table or exists, but with the ProcCategoryVendorSelection::Any enumeration value; or exists, but with the ProcCategoryVendorSelection::Standard enumeration value. The vendor is associated with the category with either the preferred or the standard status or exists, but with the ProcCategoryVendorSelection::Preferred enumeration value, and the vendor is associated with the category with the preferred status.
We do check whether the vendor is blocked first. If blocked, the result will be an empty set.
This method does work cross-company.