Solved

Isse with PXSelector

  • 3 November 2023
  • 2 replies
  • 66 views

Userlevel 1

I am new to Acumatica and am struggling to get a selector working in the purchase order screen. I want to add a customer field to the screen in the header area. I have created a custom field and want to use a selector to allow the user to choose the customer for the PO.

 

Here is the custom field:

        [PXDBString]
        [PXUIField(DisplayName = "Customer")]
        [PXSelector(typeof(SearchFor<Customer.bAccountID>
                             .In<SelectFrom<MOSCustomerProject>
                             .InnerJoin<BAccount>
                             .On<Customer.bAccountID.IsEqual<BAccount.bAccountID>>>),
                    new Type[] {
                        typeof(Customer.bAccountID),
                        typeof(BAccount.acctName)
                    },
                    DescriptionField = typeof(BAccount.acctName),
                    SubstituteKey = typeof(BAccount.bAccountID))]

The issue that I am having is that the selector does not get populated with the customers. If I manually put a customer’s bAccountID in the database field, the correct customer's name is displayed but opening the selector does not show the list of customers.

icon

Best answer by Django 3 November 2023, 19:08

View original

2 replies

Userlevel 7
Badge +5

One of the challenges with BAccount is that it is used my Vendors as well. So when you have a second view in a graph that references BAccount, it will still “think” like the record your first BAccount view looks at (which is likely Vendors).

Try changing your selector to use BAccount2 or BAccountR and see if that helps.

Userlevel 1

Thank you for this. The selector now displays the customers.

Some additional questions:

  1. Where are the DACs documents? I can’t find anything about BAccount, BAccount2, etc.
  2. When I select a new customer and click the Select button, the bAccountID is displayed until I move away from the field. Can this just display the name?
  3. In the same DAC extension, can I reference a different field in the selector query? For example, the user selects a customer and then I want to populate another field with that customer’s projects.
  4. Is it best practice to put each customization in its own “project”, i.e. I have a customization the SO screen and another for the PO screen.
  5. Should all customizations for the same screen be in the same “project”?

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