Solved

Owner Custom Selector in Project Screen

  • 25 July 2023
  • 3 replies
  • 94 views

Userlevel 7
Badge +10

Hi,

I want a custom selector on my project screen that functions the same way as the 'Owner' selector on the Project Quote screen. I have provided my code, and although I am getting a selector, it does not match the 'Owner' selector Of the Project Quote screen.

 

#region UsrOwner
public abstract class usrOwner : PX.Data.BQL.BqlInt.Field<usrOwner> { }

[PXSelector(typeof(Search<Contact.contactID,
Where<Contact.contactType, Equal<ContactTypesAttribute.person>,
And<Contact.isActive, Equal<True>>>>),
SubstituteKey = typeof(Contact.displayName),
DescriptionField = typeof(Contact.fullName))]
[PXDBInt(BqlField = typeof(CROpportunityRevision.ownerID))]
[PXUIField(DisplayName = "Owner", Visibility = PXUIVisibility.SelectorVisible)]
public virtual int? UsrOwner { get; set; }
#endregion

The below mentioned data I want in my custom selector field.

The below image shows wrong data which I ‘m getting from my code. 

 

Regards,

Sweta

icon

Best answer by Naveen Boga 25 July 2023, 13:01

View original

3 replies

Userlevel 7
Badge +17

@sweta68  Great! Thanks for sharing the update.

Userlevel 7
Badge +10

Hi @Naveen Boga I tried the same code, now it's working fine.

Thanks for suggestion.

Regards,

Sweta

Userlevel 7
Badge +17

Hi @sweta68 Why don’t you use the Owner attribute instead of custom selector for the custom field like below?

 

#region UsrOwner


[Owner(DisplayName = "Owner")]
[PXUIField(DisplayName = "Owner", Visibility = PXUIVisibility.SelectorVisible)]
public virtual int? UsrOwner { get; set; }
public abstract class usrOwner : PX.Data.BQL.BqlInt.Field<usrOwner> { }
#endregion

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved