Hi, I have a requirement where the values entered in the Attributes form need to be pulled into a custom form I make. So, I basically need a way to have a custom line level drop-down list field which contains all the values that are previously entered in the Attributes form. Any help regarding this would be appreciated.
Solved
Get Attribute Values from Attributes form to Custom Line Level Field
Best answer by Naveen Boga
public virtual void DACName_FieleName_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e)
{
List<string> allowedValues = new List<string>();
foreach (CSAttributeDetail objCSAttributeDetail in PXSelect<CSAttributeDetail,
Where<CSAttributeDetail.attributeID, Equal<Required<CSAttributeDetail.attributeID>> >>.Select(Base, "PKGOPTIONS"));
{
allowedValues.Add(objCSAttributeDetail.Description);
}
e.ReturnState = PXStringState.CreateInstance(e.ReturnState, 10, true, typeof(DACName.FieldName).Name, false, -1, string.Empty, allowedValues.ToArray(), allowedValues.ToArray(), false, null);
}
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.