Skip to main content
Solved

Dynamically enable field and make Files field mandatory.

  • May 15, 2023
  • 11 replies
  • 395 views
  • Translate All

Michael Ndungipartnerhold
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

11 replies

Naveen Boga
Captain II
Forum|alt.badge.img+20

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.

 

 

Translate

aaghaei
Captain II
Forum|alt.badge.img+11
  • Captain II
  • 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.
Translate

Michael Ndungipartnerhold
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:
 

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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.

Translate

Michael Ndungipartnerhold
Varsity I
Forum|alt.badge.img

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.

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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

Translate

Michael Ndungipartnerhold
Varsity I
Forum|alt.badge.img

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?

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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

Translate

Michael Ndungipartnerhold
Varsity I
Forum|alt.badge.img

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

Find the code section here. File attached.
 

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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.

Translate