I need to be able to refresh a document when its first opened. I have several lookups that change and need them to be refreshed. This is web application. I have Automatically Fresh Fields enabled, but the field do not refresh. The lookups have NoCache in them but they do not refresh.
I tried putting in edit mode but that did not help either. I also tried putting a button with submit() to force a save, the problem is that i have an agent that sends emails in the WebQuerySave event, that should not be triggered until a real submit is done.
All sugestions are welcomed. Im desperate
Subject: Desperate for refresh document in web (Solution)
function refresh(){// Emulates refresh on keyword change.
// Call to retain field values while recalculating form.
if( window.document.forms[0].name == “” ) {
// read mode
window.location.reload(true);
return false;
}
else{
// edit mode
_doClick(‘$Refresh’, this, null, null);
return false;
}
}
Subject: RE: Desperate for refresh document in web (Solution)
Unless you really need a “right this second” solution, it’s probably better to avoid doing the refresh altogether by using an AJAX method to get your data. This can be done fairly easily by creating an XML or JSON formatted view and using code in the field onChange event to populate the dependency fields or using the same method with an agent to generate the XML/JSON will avoid the need for a view (though the view path is probably faster to build if you have no additional logic and are just trying to emulate the refresh functionality. Going this route obviates the need for the page refresh altogether and provides your users with a cleaner experience on your site.