В чем разница, PXSelector против PXDBScalar - PullRequest
0 голосов
/ 11 октября 2018

Я пытаюсь выяснить, когда использовать PXDBScalar.Ребята, вы знаете разницу между PXSelector и PXDBScalar и когда использовать какой?

1 Ответ

0 голосов
/ 17 октября 2018

Вкратце PXDBScalar обычно используется для несвязанных полей ЦАП (не хранится в таблице).Например, если вы хотите, чтобы имя поставщика было удобно в выборке DAC, вы можете настроить поле DAC с именем поставщика, не сохраняя его в таблице.Также это хорошо работает с GI.

PXSelector - это атрибут для поля ЦАП, который позволит 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.
...