Skip to main content
Solved

Handle Popup through REST API

  • January 27, 2022
  • 4 replies
  • 513 views

jinin
Pro I
Forum|alt.badge.img+11

Hi All,

When we update specific fields on some forms under certain circumstances, the system displays popup dialog boxes where we need to respond to a question (by clicking a button “Yes” or “No”) in order to proceed.
For example, when we update the Customer Class value on the Customers (AR303000) form for an existing customer, the system displays a warning dialog box with the text Please confirm if you want to update current customer settings with the customer class defaults. Otherwise, original settings will be preserved. and the Yes and No buttons. we should click Yes to proceed with changing the customer class.

We can able to add command and achieve this through SOAP API calls, But, how we can handle this through REST API?   

Best answer by Dmitrii Naumov

As far as I remember, the default REST API behavior is that it automatically clicks ‘Ok’ or ‘Yes’ in all popups if they appear. 

4 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • January 27, 2022

As far as I remember, the default REST API behavior is that it automatically clicks ‘Ok’ or ‘Yes’ in all popups if they appear. 


jinin
Pro I
Forum|alt.badge.img+11
  • Author
  • Pro I
  • January 28, 2022

Hi @Dmitrii Naumov 

Thanks for the update. we checked this with the default Acumatica screen is working fine. But our custom screen not updating the details properly.

Should we write the separate code based on the IsContractBasedAPI field?

Any other best way to work the same with the custom screen?

 

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • January 28, 2022

@jinin yes, I think for your custom screen you can skip showing the confirmation using IsContractBasedAPI  flag.


jinin
Pro I
Forum|alt.badge.img+11
  • Author
  • Pro I
  • January 28, 2022

Thanks a lot, @Dmitrii Naumov. We will check.