I have a created a new SQL database table/DAC/Graph to collect some information that will be related to Stocked Items from an outside application. I have extended the Default web services endpoint to include this information. This all works well.
My issue is that the custom DAC has a property for InventoryID but it expects an integer value which no one knows, they only know the item number. I have also added a property to the DAC for InventoryCD which is also exposed to the API, I can write to this just fine. Problem is that I can’t join this DAC to others in a GI since all the other DACs want to link on InventoryID.
How do I merge these 2 into 1 so that the json payload can submit the InventoryCD and the DAC translate this and store the appropriate integer value.
Here is the current DAC definition for these fields:
#region InventoryID
[PXDBInt()]
[PXUIField(DisplayName = "Inventory ID")]
public virtual int? InventoryID { get; set; }
public abstract class inventoryID : PX.Data.BQL.BqlInt.Field<inventoryID> { }
#endregion
#region InventoryCD
[PXDBString(30, IsUnicode = true, InputMask = "")]
[PXUIField(DisplayName = "Inventory CD")]
public virtual string InventoryCD { get; set; }
public abstract class inventoryCD : PX.Data.BQL.BqlString.Field<inventoryCD> { }
#endregion