Skip to main content
Solved

Dynamically enable field and make Files field mandatory.


Michael Ndungi
Varsity I
Forum|alt.badge.img

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.

Best answer by Naveen Boga

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.

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

11 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • May 15, 2023

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.

 

 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1204 replies
  • May 15, 2023
  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.

Michael Ndungi
Varsity I
Forum|alt.badge.img

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

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • May 15, 2023

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.


Michael Ndungi
Varsity I
Forum|alt.badge.img
Naveen Boga wrote:

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.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • May 15, 2023

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!!


Michael Ndungi
Varsity I
Forum|alt.badge.img
Naveen Boga wrote:

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?


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • May 17, 2023

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


Michael Ndungi
Varsity I
Forum|alt.badge.img
Naveen Boga wrote:

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

Find the code section here. File attached.
 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • May 17, 2023

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


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • Answer
  • May 18, 2023

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


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