This is related to a question I posted a couple of days ago. The answer there led me to find this problem.
I have the following code in a Submit button
if (validateFields(document.forms[0])==true){
if (validateAdditionalFields(document.forms[0])==true){
document.getElementById("Status").value = "Submitted for RFP";
getRespParty('ResponsibleParty');
document.forms[0].submit();
}
}
I have the following code in the getRespParty function in the JSHeader
function getRespParty(x) {
var noEmployees = document.getElementById('NoEmployees').value;
var stateName = document.getElementById('State').value
var url = 'http://' + window.location.host +
'/ebsprospects.nsf/(GetResponsiblePerson)?OpenAgent&NoEmployees=' +
noEmployees + '&State=' + stateName;
var xhttp = new XMLHttpRequest();
xhttp.open("GET", url);
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(x).value = xhttp.responseText;
}
};
xhttp.send();
}
The (GetResponsiblePerson) agent ends with this code (I am doing a series of dbLookups to return a specific person which is why it has to be in LS)
Dim nam As NotesName
Set nam = session.Createname(respParty)
Print "Content-type:text/plain"
Print nam.Abbreviated
The field ResponsibleParty field is text, visible, editable, and the ID field on the HTML tab is ResponsibleParty. When the code returns, the field shows the name I am expecting to see. However, it does not appear to really be saving it because the client side document does not contain anything in the matching ResponsibleParty field. There is no code in the WQS. The ResponsibleParty field in the client is hidden and editable as is the Status field which does get saved so at least I know that the save is working?
Why will the field value that is returned from the agent not save? Is type of logic even doable or do I need to do it a different way?