Implemented send direct functionality
authorMartin Taal <martin.taal@openbravo.com>
Tue, 14 Dec 2010 16:15:46 +0100
changeset 9132 442f3f9bc63e
parent 9131 1fee5f946d34
child 9133 3f11324a9ac2
Implemented send direct functionality
src/org/openbravo/erpCommon/utility/ReferencedLink.java
--- a/src/org/openbravo/erpCommon/utility/ReferencedLink.java	Tue Dec 14 16:10:45 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/ReferencedLink.java	Tue Dec 14 16:15:46 2010 +0100
@@ -163,7 +163,13 @@
     // vars.getRequiredStringParameter("inpKeyReferenceName");
     // String strTableId =
     // vars.getRequiredStringParameter("inpTableId");
-    String strTableReferenceId = vars.getRequiredStringParameter("inpTableReferenceId");
+    String strTableReferenceId;
+    if (vars.hasParameter("inpEntityName")) {
+      String entityName = vars.getStringParameter("inpEntityName");
+      strTableReferenceId = ModelProvider.getInstance().getEntity(entityName).getTableId();
+    } else {
+      strTableReferenceId = vars.getRequiredStringParameter("inpTableReferenceId");
+    }
     String strKeyReferenceId = vars.getStringParameter("inpKeyReferenceId");
     // String strTabId = vars.getStringParameter("inpTabId");
     String strWindowId = vars.getStringParameter("inpwindowId");