Solved

PXSelector for custom table

  • 28 January 2022
  • 2 replies
  • 355 views

Userlevel 2
Badge

We are writing a custom integration between Salesforce and Acumatica as the customer requirements are outside of the built-in integration provided by Acumatica.  To establish a synchronization between SF Users and Acumatica Salesperson we have created a custom table SFUsers with two fields SFUserID and SFFullName.  Both are string fields.  What we want to do is to add a custom field to the Acumatica Salesperson screen called UsrSFUser that does a PXSelector on the SFUsers table.  Here is the code that is not working:

using PX.Data.EP;
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Data;
using PX.Objects.AR;
using PX.Objects;
using System.Collections.Generic;
using System;

namespace SenteSFIntegration
{
  public class SalesPersonExt : PXCacheExtension<PX.Objects.AR.SalesPerson>
  {
    #region UsrSFUser
    [PXDBString(20)]
    [PXUIField(DisplayName="SF User")]
    [PXSelector(typeof(Search<SFUsers.sFUserID>),
     DescriptionField = typeof(SFUsers.sFFullName),
     CacheGlobal = true)]
    public virtual string UsrSFUser { get; set; }
    public abstract class usrSFUser : PX.Data.BQL.BqlString.Field<usrSFUser> { }
    #endregion
  }
}

The error is:  The type name 'sFUserID' does not exist in the type 'SFUsers'

 

icon

Best answer by johnw51 28 January 2022, 17:23

View original

2 replies

Userlevel 7
Badge +11

Hi @johnw51 

The selector looks fine for me. Can you please share the 'SFUsers' DAC?

Userlevel 2
Badge

Thank you.  I hadn’t noticed that it lower cased sfuserid.  It publishes now.

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