Hi, Can anyone help me, I have created custom field in Stock Item - IN202500 and retrieve data from from Attribute - CS205000. but, not showing data. bellow screen capture in stock item screen and my DAC



Hi, Can anyone help me, I have created custom field in Stock Item - IN202500 and retrieve data from from Attribute - CS205000. but, not showing data. bellow screen capture in stock item screen and my DAC



Best answer by DipakNilkanth
Hi
Please use the code snippet below.
Make sure to replace your attribute name with colorAttribute and Color with DIVISI.(Confirm Attribute name from attributes screen)
#region UsrColor
[PXDBString(50)]
[PXUIField(DisplayName = "Color")]
[PXSelector(
typeof(Search<CSAttributeDetail.valueID,
Where<CSAttributeDetail.attributeID, Equal<colorAttribute>>>),
typeof(CSAttributeDetail.valueID),
typeof(CSAttributeDetail.description),
DescriptionField = typeof(CSAttributeDetail.description)
)]
public virtual string UsrColor { get; set; }
public abstract class usrColor : PX.Data.BQL.BqlString.Field<usrColor> { }
#endregion
}
public class colorAttribute : PX.Data.BQL.BqlString.Constant<colorAttribute>
{
public colorAttribute() : base("COLOR") { }
}Hope, it helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.