Solved

Dynamically enable field and make Files field mandatory.


Userlevel 4
Badge

Hello Everyone,
Kindly assist in making AFE Number field enabled once the requisition is approved.
And also is there a way to make Files field mandatory/Required once a requisition is approved?

see below
 

Kindly assist
URGENT!
Any kind of response will be highly appreciated.

icon

Best answer by Naveen Boga 18 May 2023, 19:23

View original

11 replies

Userlevel 7
Badge +17

Hi @development93  I think the below post might help in terms of enabling the field after document is approved.

Please let me know if any additional help is required.

 

 

Userlevel 7
Badge +8
  1. To enable any desired field, in the RowSelected Event of your graph Ext after mumbo jumbos set

Base.YourView.Cache.AllowUpdate = true;

PXUIFieldAttribute.SetEnabled<YourDAC.yourField>(e.Cache, e.Row, true);

 

Depending on the Form you might be able to play with its status flow for this purpose as well.

 

  1. and yes on Persist method or RowPersisting handler, you can check if a document has attachments by looking into NoteDoc for the NoteID of your current Document and see if any attachments exist there or not.
Userlevel 4
Badge

Hi, I have done exactly as proposed but its not coming through, what could be the issue
see below code:
 

 

Userlevel 7
Badge +17

Hi @development93  As I provided in the above post, it cannot be enabled with only the code and this field should be enabled form the Workflow as well.

Then only it will work and the field will be enabled.

Userlevel 4
Badge

Hi @development93  As I provided in the above post, it cannot be enabled with only the code and this field should be enabled form the Workflow as well.

Then only it will work and the field will be enabled.

okay thank you for quick response.

is it possible if you can share a screenshot of where exactly I should enable this, tried my way but still no change.
Thanks a lot for the help.
saved me a lot.

Userlevel 7
Badge +17

Hi @development93  Please go through this link. It is explained how to enable the fields with the Workflows.

Here is the link.

https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html

 

hope this helps!!

Userlevel 4
Badge

Hi @development93  Please go through this link. It is explained how to enable the fields with the Workflows.

Here is the link.

https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html

 

hope this helps!!

Hi @Naveen Boga  I went through the link, did as illustrated there but still the field was not enabled at the specified document status i.e. “B” 
see below


could there be anything else I might be missing on?

Userlevel 7
Badge +17

Hi @development93  Can you please share the customization package here for our review.

Userlevel 4
Badge

Hi @development93  Can you please share the customization package here for our review.

Find the code section here. File attached.
 

 

Userlevel 7
Badge +17

thanks for sharing the package @development93  Will check this and let you know.

Userlevel 7
Badge +17

Hi @development93  I added only the required code to enable the field when Requisition is in PENDING BIDDING status and APPROVED. Field got successfully enabled

 Please find the screenshots for reference.

You can add logic to make the field mandatory.

 

 

Also attached customization package for reference.

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