Skip to main content
Answer

How to refresh screen after updating a customer object

  • July 21, 2025
  • 11 replies
  • 134 views

Forum|alt.badge.img

I’m trying to refresh the screen AR303000 after I updated the customer status via REST-API. This is my API-Call (PUT):

{
"CustomerID": {
"value": "XXXX"
},
"Status": {
"value": "A"
}
}

Right now the user has to manually refresh the screen to see the new status value. If the user changes the customer data without hitting refresh he receives an error.

Is there any possibility to refresh the screen after the customer object is updated by the REST call?

 

Best answer by Abhishek Niikam

​Hello, @BEXJens 


What's Not Supported

  • There's no native REST API call or hook to trigger a screen UI refresh.

  • The Acumatica UI is not real-time reactive to back-end updates done via API or outside the current session context.

Recommendation

For now, the best practice is:

  • Either inform users to refresh manually,

  • Or implement a small customization to auto-reload the record on certain triggers (e.g., on focus or save attempt).

I hope it helps!

11 replies

Forum|alt.badge.img+2

​Hello, @BEXJens 


What's Not Supported

  • There's no native REST API call or hook to trigger a screen UI refresh.

  • The Acumatica UI is not real-time reactive to back-end updates done via API or outside the current session context.

Recommendation

For now, the best practice is:

  • Either inform users to refresh manually,

  • Or implement a small customization to auto-reload the record on certain triggers (e.g., on focus or save attempt).

I hope it helps!


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 21, 2025

Thanks for your response!

Could you tell me the possibilities to inform the users to refresh the screen? 


Forum|alt.badge.img+2

@BEXJens , You can 

 

1. Show an Inline Warning Message

Use RaiseExceptionHandling to display a warning near the Status field, like this:

Base.Caches<BAccount>().RaiseExceptionHandling<BAccount.status>( customer, customer.Status, new PXSetPropertyException("Customer status changed. Please click 'Refresh Customer' to update.", PXErrorLevel.Warning) );

This will alert the user that the data may be stale and prompt them to refresh.

 

2. Add a "Refresh Customer" Button 

You can add a simple custom button that reloads the customer record from the database when clicked, ensuring the latest data is shown without needing a full screen refresh.

 

I hope it helps!


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 21, 2025

Hi Abhishek, 

thanks for the reply.

To inform the user to refresh manually i still need an event that is triggered after the customer object ist updated by the rest api. A button wouldn’t solve this problem.

How can I use the exception to solve my problem?

 

Thanks in adavance.


Forum|alt.badge.img+2

@BEXJens You may use this approach:
 

use this in RowSelected:

protected void _(Events.RowSelected<BAccount> e)
{
if (e.Row == null) return;

var latest = PXDatabase.SelectSingle<BAccount>(
new PXDataField("Status"),
new PXDataFieldValue("BAccountID", PXDbType.Int, e.Row.BAccountID)
);

if (latest != null && latest.ToString() != e.Row.Status)
{
Base.Caches<BAccount>().RaiseExceptionHandling<BAccount.status>(
e.Row,
e.Row.Status,
new PXSetPropertyException("Status may be changed. Please refresh the screen.", PXErrorLevel.Warning)
);
}
}

This shows a warning icon on the Status field & good for gentle reminders.


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 21, 2025

@Abhishek Niikam 

Will the “RowSelected” be triggered when the status is updated by the rest api?


Forum|alt.badge.img+2

@BEXJens Yes , you are right it will not until user interact manually, I confirmed that!

I think the JavaScript will work in this situation. I’m trying with it & If I find something i will share it.


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 21, 2025

@Abhishek Niikam 

Thank you! I’m looking forward to your solution.


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 25, 2025

@Abhishek Niikam

Could you figure out how to solve the problem with javascript?


Forum|alt.badge.img
  • Author
  • Freshman II
  • September 12, 2025

@Abhishek Niikam

Could you please give me some feedback on that?


Forum|alt.badge.img+2

@BEXJens there’s no built-in way for a REST update to auto-refresh the AR303000 screen. The change will only show after the user manually refreshes. To avoid concurrency errors, you can add a small graph extension that compares the record’s tstamp with the database and, if it’s stale, forces an automatic reload on the next user action. This way, instead of getting the “record changed” error, the screen reloads and shows the updated status.