diff --git a/web/js/utils.js b/web/js/utils.js
--- a/web/js/utils.js
+++ b/web/js/utils.js
@@ -706,11 +706,49 @@
         newTarget = 'hiddenFrame';
       }
     if (newTarget != null) form.target = newTarget;
+    
+    form.action = addCommandToFormAction(form.action, action);
+    
     submitForm(form.Command, action, form, bolOneFormSubmission, isCallOut);
   }
   return true;
 }
 
+/**
+ * Adds a command parameter to a forms action url or if it is already set, replaces the value 
+ * in the url.
+ * 
+ * @param formAction the form action url
+ * @param command the command to set
+ * @return the new url
+ */
+function addCommandToFormAction(formAction, command) {
+  // add the command as an extra parameter so that the command is always present in the url
+  var COMMAND_PARAM = "_commandParameter";
+  var result = formAction;
+  if (formAction) {
+    // handle different situations
+    // 1) url has no parameters at all
+    var commandParamIndexOf = formAction.indexOf(COMMAND_PARAM);
+    var questionMarkIndexOf = formAction.indexOf("?");
+    if (questionMarkIndexOf === -1) {
+      // 1) url has no parameters at all
+      result = formAction + '?' + COMMAND_PARAM + '=' + command;
+    } else if (commandParamIndexOf === -1){      
+      // 2) there are parameters but no command_param yet
+      result = formAction + '&' + COMMAND_PARAM + '=' + command;
+    } else {
+      // 3) the command_param is already present, replace it
+      var ampersandIndexOf = formAction.indexOf("&", commandParamIndexOf);
+      result = formAction.substring(0, commandParamIndexOf) + COMMAND_PARAM + '=' + command;
+      // if there are parameters after the commandparam then add it
+      if (ampersandIndexOf !== -1) {
+        result = result + formAction.substring(ampersandIndexOf);           
+      }
+    }
+  }
+  return result;
+}
 
 /**
 * Submit a form after setting a value to the Command field, and adding an additional parameter/value to the form. This function requires a hidden Command field in the form.
@@ -763,6 +801,9 @@
       newTarget = 'hiddenFrame';
     }
     if (newTarget != null) form.target = newTarget;
+    
+    form.action = addCommandToFormAction(form.action, action);
+
     submitForm(form.Command, action, form, bolOneFormSubmission, isCallOut);
   }
   return true;
@@ -5230,7 +5271,7 @@
   var keyName = null;
   var recordId = null;
   var title = null;
-  var mode = null;
+  var command = null;
   if (typeof getElementsByName('inpwindowId','input')[0] !== "undefined") {
     windowId = getElementsByName('inpwindowId','input')[0].value;
   }
@@ -5247,17 +5288,35 @@
     title = document.getElementById('tabTitle_text').innerHTML;
   }
 
-  if (tabId === null && !document.getElementById('buttonAbout')) {
-    mode = "error";
-    title = "Error";
-  } else if (tabId === null) {
-    mode = "manual";
-  } else if (document.getElementById("grid_table_dummy_input")) {
-    mode = "grid";
-  } else if (recordId === "") {
-    mode = "new";
-  } else {
-    mode = "edit";
+  // try to get the command from the url
+  var search = location.search; 
+  if (search && search !== "") 
+  { 
+    search = search.substr(1); 
+    var params = search.split("&"); 
+    for (var i = 0; i < params.length; i++) 
+    { 
+        var pairs = params[i].split("="); 
+        if(pairs[0] === '_commandParameter') 
+        { 
+            command = pairs[1]; 
+        } 
+    }
+  }
+  
+  if (command === null) {
+    if (tabId === null && !document.getElementById('buttonAbout')) {
+      command = "error";
+      title = "Error";
+    } else if (tabId === null) {
+      command = "manual";
+    } else if (document.getElementById("grid_table_dummy_input")) {
+      command = "grid";
+    } else if (recordId === "") {
+      command = "new";
+    } else {
+      command = "edit";
+    }
   }
 
   var obManualURL = document.location.href;
@@ -5266,7 +5325,7 @@
   obManualURL = obManualURL.replace(appUrl, "");
 //obManualURL = obManualURL.replace("?hideMenu=true&noprefs=true", "");
   obManualURL = obManualURL.substring(0, obManualURL.indexOf("?"));
-  if (mode !== "manual") {
+  if (tabId) {
     obManualURL = null;
   } else {
     windowId = null;
@@ -5277,7 +5336,7 @@
   try {
     if (document.getElementById('buttonBack') || document.getElementById('buttonAbout')) {
       if (typeof LayoutMDI.OB.Layout.ClassicOBCompatibility.setTabInformation === "function") {
-        LayoutMDI.OB.Layout.ClassicOBCompatibility.setTabInformation(windowId, tabId, recordId, mode, obManualURL, title);
+        LayoutMDI.OB.Layout.ClassicOBCompatibility.setTabInformation(windowId, tabId, recordId, command, obManualURL, title);
       }
     }
   } catch (e) { }

