1
votes

I have a Usr field that was custom in a project at one point. Since it has been compiled into a .dll so I do not have the original files to change this Usr field. When I click on the field and go to customize attributes it is not found because it is a Usr Field and not in the Data Access. Is there a way I can change the items that are in the dropdown list of this Usr Field if I can't find it in the Data Access? I have tried going to override on screen level with a PXStringList change and this did not work.

If I need more details please let me know.

1

1 Answers

2
votes

You can do it in one of the following ways:

  1. Create CacheExtension for the DAC of that Field and override the property with Attributes.
  2. Create CacheAttached event in the Graph and overwrite the Attributes.
  3. Use PXStringListAttribute.SetList<DAC.field>(cache, row, allowedValues, allowedLabels) method to change the list of values and labels.

Below is example how to change the Attributes of the field using CacheAttached event:

[PXDBString(3, IsFixed = true, IsUnicode = true, InputMask = "")]
[PXStringList(new string[] {"comp1", "comp2", "comp3", "comp4", "comp5", "comp6", "comp7"}, new string[] {"comp1", "comp2", "comp3", "comp4", "comp5", "comp6", "comp7"})] 
[PXUIField(DisplayName = "Company")]
protected virtual void ARInvoice_UsrDivision_CacheAttached(PXCache cache){}