Skip to main content

ProjectWithWarnings Design Question/Suggestion

  • 22 December 2022
  • 1 reply
  • 23 views

The Restrictor attribute  PX.Objects.PR.ProjectWithWarningsAttribute became an issue for me after adding an additional stage to my Project workflow.  The additional stage required an appended/expanded version of the PXStringListAttribute for the Project Status field. This caused an issue with the ProjectWithWarningsAttribute. When pMProject.Status != "A" it calls 

string text = new ProjectStatus.ListAttribute().ValueLabelDicapMProject.Status];

This causes a key not found in dictionary exception as my ProjectStatus_Ext is being used and contains keys not in the standard ProjectStatus ValueLabelDic.

My suggestion would be to use TryGetValue and to use the IsActive field in the project rather than checking if the Status field equals ‘A’.

 

1 reply

Userlevel 6
Badge +3

I’m not sure, what is your question about?

From mine prospective, if I wasn’t happy about some Acumatica attributes, I’ve just inherited from them, and overriten methods/logic, which I was unhappy about. Can you do the same?

Reply