Aug 7, 2013 9:22 AM
93 Posts
topic has been resolvedResolved

Value on saved when debug panel is open

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 1

Hi guys,


I am using the debug custom control, (issue is not here)

I set a text field and save a document then run some workflow code against it. All fields that are filled in on my xpage are saved on the backend document, except one!

However, if I have debug panel showing, the value is then stored on the backend document. (Debug images at bottom of the post)


Has anyone experienced this or have any ideas?

In the beforePageLoad code I have: viewScope.formDescription = "FPolicy";


The default value for the field in question is:

if(viewScope.formDescription = "FPolicy"){
return "CSR Compliance Portal" 
writeToLog("Not Working");
return "NOT SET"}

Then the code on a field that builds a string of 3 fields, including the field above is: (RFCEnvironment is the field name above / Key 2 in the code below, and the field that is not saving)

var key1 = String(currentDocument.getValue("flow_step"));

if(key1 == null || key1 == "null" || key1 == ""){
key1 = "10";
var key2 = getComponent("RFCEnvironment").getValue();
if(key2 == null || key2 == "null" || key2 == ""){
key2 = "CSR Compliance Portal";
var key3 = getComponent("domain").getValue();
key2 + "|" + key3 + "|" + key1;


Thanks for any pointers






Aug 8, 2013 10:04 AM
93 Posts

I didnt work out why it was happening but I have fixed the issue, so this might be useful if anyone experiences similar problems.

Changed my create form button to call a function and set the fields and save the document and redirect back to it.


function createRegionalPolicy() {
try {
var valid:boolean = true;
writeToLog("createRegionalPolicy Starting");
var RegionalPolicyDoc:NotesDocument = database.createDocument();
RegionalPolicyDoc.computeWithForm(true, false);
RegionalPolicyDoc.replaceItemValue("createdBy", @Name("[CN]", @UserName()));
RegionalPolicyDoc.replaceItemValue("RFCEnvironment", "CSR Compliance Portal");;
var uid:string = RegionalPolicyDoc.getItemValueString("UID");
writeToLog("UID: " + uid);
context.redirectToPage("XP_Policy.xsp?documentId=" + RegionalPolicyDoc.getUniversalID() + "&action=editDocument" );
valid = false;
writeToLog("Problem creating RegionalPolicy document: " + e);
finally {
return valid;