1
votes

I'm trying to create a new Contact field on the Stock Item screen that has a selector pointing to Contacts but it doesn't work: enter image description here

Here are the attributes of the Contact field:

[PXDBInt]
[PXUIField(DisplayName="Contact",Visibility = PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(
        Search<CRContact.contactID>
    )
    , new Type[] { typeof(CRContact.contactID), typeof(CRContact.firstName), typeof(CRContact.lastName), typeof(CRContact.fullName), typeof(CRContact.email) }
    , SubstituteKey = typeof(CRContact.contactID)
    , DescriptionField = typeof(CRContact.fullName)
    , CacheGlobal = true)]

Am I missing an attribute or something?

1

1 Answers

0
votes

You assigned substitute key as CRContact.contactID. That is the reason that you see 0 displayed. Recommend to assign CRContact.fullName as the substitute key, since this DAC has no natural keys....ie ContactCD.