Skip to content

Instantly share code, notes, and snippets.

View ste-bel's full-sized avatar

Stéphane Bélanger ste-bel

  • Asgard Alliance Software
  • Montréal, Québec, Canada
View GitHub Profile
// GUID, defaulting by "old" algorithm (timestamp + ethernet MAC address)
[PXDBSequentialGuid(IsKey=true)]
[PXReferentialIntegrityCheck]
[PXUIField(DisplayName="ID")]
public Guid? FilterID { get; set; }
[PXDBGuid(false, IsKey=true)]
public Guid? WebHookID { get; set; }
[PXDBString(10, IsUnicode = true, IsKey = true)]
[PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
[PXUIField(DisplayName = "Class ID", Visibility=PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(CustomerClass.customerClassID), CacheGlobal = true)]
[PXFieldDescription]
[PXReferentialIntegrityCheck]
public string CustomerClassID { get; set; }
@ste-bel
ste-bel / DocType.cs
Last active December 15, 2021 22:50
[PXDBString(3, IsKey = true, IsFixed = true)]
[PXDefault]
[ARDocType.List]
[PXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible, Enabled = true, TabOrder = 0)]
public string DocType { get; set; }
public class ARDocType : ILabelProvider {
public const string Invoice = "INV";
public const string NoUpdate = "UND";
public const string Undefined = "UND";
/// <summary>
/// The identifier of the business account.</summary>
/// <remarks>This field is auto-incremental and not visible
/// This field is a surrogate key, as opposed to the natural key <see cref="AcctCD"/>.
/// </remarks>
[PXDBIdentity]
[PXUIField(Visible = false, Visibility = PXUIVisibility.Invisible, DisplayName = "Account ID")]
[PXReferentialIntegrityCheck]
public int? BAccountID { get; set; }
[PXDBGuid(false)]
[PXDefault]
public Guid? WebHookID { get; set; }
[PXDBString(128, IsUnicode=true, IsKey=true, InputMask="")]
[PXDefault]
[PXSelector(typeof(WebHook.name), new Type[] { typeof(WebHook.name), typeof(WebHook.isActive), typeof(WebHook.isSystem) })]
[PXUIField(DisplayName="Webhook Name")]
public string Name { get; set; }
[PXDBIdentity(IsKey=true)]
[PXUIField(Visible=false)]
public int? LogID { get; set; }
[PXDBLongIdentity(IsKey=true)]
[PXUIField(DisplayName="Record ID", Enabled=false, Visible=false)]
public long? RecordID { get; set; }
@ste-bel
ste-bel / LineNbr.cs
Last active December 15, 2021 22:47
[PXDBInt(IsKey = true)]
[PXUIField(DisplayName = "Line Nbr.", Visible = false)]
public int? LineNbr { get; set; }
// Child Key
[PXDBDefault(typeof(BCBinding.bindingID))]
[PXDBInt(IsKey=true)]
[PXParent(typeof(Select<BCBinding, Where<BCBinding.bindingID, Equal<Current<BCBindingBigCommerce.bindingID>>>>))]
[PXUIField(DisplayName="Store", Visible=false)]
public int? BindingID { get; set; }
// Parent Key
[PXDBIdentity]
[PXUIField(DisplayName="Store ID", Visible=false)]