Hi,
I’m working on my first customization adding a new table / DAC with a foreign key linking to Customers.
The need is to restrict the selection of the customer to only customers belonging to a specific class.
This is what I currently have in my DAC definition for this field:
#region CustomerID
[PXRestrictor(typeof(Where<Customer.customerClassID, Equal<Customer.customerClassID.Contains<"SPECIAL">>>), "Not a Special Customer")]
[Customer]
[PXDefault]
public virtual int? CustomerID{ get; set; }
public abstract class customerID :
PX.Data.BQL.BqlInt.Field<customerID>
{ }
#endregion
I’m getting a “CS1031: Type expected” error on “SPECIAL”. I can’t find an example of creating a PXRestrictor condition that isn’t based around a boolean, null check or comparison to a value from a matching field on this DAC. Is there a way I can create this sort of hard-coded filter?
Appreciate any guidance here.