AnsweredAssumed Answered

Force refresh on a record based on another session edit/save

Question asked by Neil Conacher on Feb 13, 2020
Latest reply on Feb 26, 2020 by Neil Conacher

We have a scenario which is presenting a data consistency challenge. A bit difficult to describe but the essence is as follows:

 

1) User 1 is in an Account record view working on a record

 

2) We have a custom module which is accessed by the same user and which updates some limited fields on the Account record they have open in 1)

 

3) In our custom module, we have the ability to action a 'save'  of the current record open in 1). This avoids the trigger of a 'Resolve Conflict' message when the user moves off or Saves their record (assuming no more changes after the 'save' from 2)

 

4) We also looked at 'updating' the limited fields so that the changes made by 2) were visible to the user session in 1) - however that results in the 'Refresh Conflict' UI message which causes user confusion and data inconsistency if the user chooses their data position as the conflict choice.

 

I think our issue is because the edit session in 1) is not fully reflecting the changes made by edits in session 2).

I appreciate that the native Sugar 'Resolve Conflict' is designed to handle conflict of 2 users genuinely editing the same record.

 

My question is:

Is there a method whereby in our custom module we can force a 'refresh' of the 'this' record which we are aware of in 1)

 

For example, some code we are using to force save of fields in session 2) on the 'current' record exposed in 1)

 

   if (this.model.module=="Accounts"  {
   this.model.save({account_type: '5'});

 

Is there some function we can use to force UI refresh of 1) from custom 2) session

 

These 2 sessions are associated with the same user name.

 

Thanks

 

Neil 

Outcomes