ProjectWithWarnings Design Question/Suggestion

  • 22 December 2022
  • 1 reply
  • 22 views

Userlevel 3
Badge +1

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().ValueLabelDic[pMProject.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 5
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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved