我试图弄清楚何时使用PXDBScalar。你们知道PXSelector和PXDBScalar之间的区别以及何时使用哪一个吗?
答案 0 :(得分:0)
简而言之,PXDBScalar通常用于未绑定的DAC字段(未存储在表中)。例如,如果您希望在DAC提取中方便使用供应商名称,则可以使用供应商名称配置DAC字段,而不必将其实际存储在表中。同样,这也适用于GI。
PXSelector是DAC字段的属性,它将允许GUI执行与该字段相关的“可能值”的查找。
以下说明来自help.acumatica.com。
PXDBScalar:
Defines the SQL sub request that will be used to retrieve the value for the DAC field.
You should place the attribute on the field that is not bound to any particular database column.
The attribute will translate the provided BQL Search command into the SQL sub request and insert it into the select statement that retrieves data records of this DAC. In the BQL command, you can reference any bound field of any DAC.
Note that you should also annotate the field with an attribute that indicates an unbound field of a particular data type. Otherwise, the field may be displayed incorrectly in the user interface.
You should not use fields marked with the PXDBScalar attribute in BQL parameters (Current, Optional, and Required).
PXSelector:
Configures the lookup control for a DAC field that references a data record from a particular table by holding its key field.