Skip to main content
Answer

PXSelector for custom table

  • January 28, 2022
  • 2 replies
  • 443 views

Forum|alt.badge.img

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'

 

Best answer by johnw51

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

2 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 28, 2022

Hi @johnw51 

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


Forum|alt.badge.img
  • Author
  • Varsity I
  • Answer
  • January 28, 2022

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