QAD 2017 Enterprise Edition
>
User Guides
>
System Administration
>
Customizing Business Logic
>
Accessing Generalized Codes and Master Comments
Accessing Generalized Codes and Master Comments
Generalized Codes
You can define user-defined fields with a lookup or value list based on generalized codes. See
Create a User-Defined Field.
You can also use non-intrusive customization to add a lookup to a field based on generalized codes.
Example:
procedure bbusinessrelation.getbusinessfields.after:
find tBusinessFields where
tBusinessFields.tcFcFieldName = "tAddress.AddressZip"
no-error.
if available tBusinessFields
then assign tBusinessFields.tcLookupQuery = "BMfgGeneralizedCodeSAO.SelectGeneralizedCode"
tBusinessFields.tcLookupFilterField = "tcode_mstr.code_value"
tBusinessFields.tcLookupReturnField = "tqSelectGeneralizedCode.tccode_value"
tBusinessFields.tcRelatedObject = "<Generalized Code you need>".
end procedure.
Master Comments
You can access master comments from the customized code using the GetComment method, included in every business component. The GetComment method queries the cd_det table or the cmt_det table, or both, depending on the parameters you specify.