Wrong field status.after clear cache it's ok

Good day ! i have 2 users , they are using EDGE. In list, field Status show correct info, but entering in form it shows different value. After clearing cache - fields shows correct. How to prevent that ? Because many fields are based on status ,it show wrong fields. No errors in console. When this users see wrong value in the form, i checked at another - and it's ok. user have edit permissions at list item.

Hello @ixxxl,

What is the type of the Status field?

Is the correct Status field value displayed in a SharePoint list or in a List or Library control? Do you have any custom code related to the Status field?

Have you tried reproducing the issue in other browsers and for other SP accounts?

@mnikitina
Status field is simple dropdown field.
Status (Stare) is changed from buttons: like

var redirect = fd.source;
fd.spSaved(function(result) {
    result.RedirectUrl = redirect;
});


 if (fd.field('Clasificare').value == null || fd.field('Clasificare').value == '' || fd.field('Tipul_x0020_adres_x0103_rii').value == null || fd.field('Tipul_x0020_adres_x0103_rii').value == '' || fd.field('Prioritatea_x0020_reclama_x021b_').value == null || fd.field('Prioritatea_x0020_reclama_x021b_').value == '' || fd.field('CMSCategorii').value == ''  ) {
 alert('Verificati sa fie îndeplinit: Tip adresării, Clasificare, Prioritatea reclamatiei')
 } else { console.log('La validare')
  fd.field('IDWorkflow').value = "Validare";
	fd.field('Stare').value='Validare raspuns'
 return fd.save();
}
 

The correct Status displays in sharepoint list. It is not a list and library control. the code on Status field only fd.field('Stare').disabled=true. another browsers, accounts work good. Today appeared one more account with such problem. after clearing cookis in form appeared correct Status

@mnikitina maybe some like clearing cookies from javascript on opening form will help me?

@ixxxl,

Not sure what is causing this behavior. Please remove all the custom code and try to reproduce the issue for these accounts.

If you will reproduce the issue, check the field value from the browser console. For this, define fd globally like this:

window.fd = fd;

fd.spRendered(function () {

});

I'm not sure if that helps, I suggest trying to solve the issue first.

@mnikitina
I tried from console, and it was wrong field value. In console equals to form , but in form was wrong. Status in list=='Validare' , inform Status='Repartizare' in console Status =='Repartizare'.
i checked in my browser and was good -Status in form== 'Validare'
Clearing cache at user - and at user's form Status became=='Validare'. Strange thing...

@ixxxl,

Did you make changes to the form shortly before you noticed this error? Updated the code or something?

Have you created forms sets? If so, how is the routing set up?

@mnikitina
No, i don't make changes to the form.
I have only default form , with new,edit and display. No routing.

@ixxxl,

I have run out of ideas why this only happens for a few users and only in the Edge browser.

My last guess is that the Edge browser has the autofill option enabled, try disabling it and see if the problem persists.

1 Like

@mnikitina
Thank you, i will try

@mnikitina
I have the same problem in my form also.
After I submitted a new status, the status (a text field I set) may used the old value.
It should be the cache problem, because it will be fine if I clear the cache.

I am using window.fd = fd this already, but still have that problem.

Do you have any solution on this?

Hello @itapps,

This code is for testing purposes. With this line in the code you can call fd Form Manager and get access to all fields and containers.

Make sure that the autofill option is disabled in your browser.
If that won't help, you can try clearing the form on form load:

fd.spRendered(function () {
   fd.clear();
});