Skip to main content

ProjectWithWarnings Design Question/Suggestion

  • 22 December 2022
  • 1 reply
  • 24 views

Forum|alt.badge.img+1
  • Varsity I
  • 50 replies

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’.

 

Did this topic help you find an answer to your question?

1 reply

Yuriy Zaletskyy
Jr Varsity I
Forum|alt.badge.img+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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings