Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. var batchQuery = this.Ext.create("Terrasoft.BatchQuery");
  2. var CaseUpdateQuery = this.Ext.create("Terrasoft.UpdateQuery", { rootSchemaName: "Case" });
  3. var filters1 = CaseUpdateQuery.filters;
  4. filters1.addItem(this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Id", this.get("AlphaCurrentCase").value));
  5. CaseUpdateQuery.enablePrimaryColumnFilter(this.get("AlphaCurrentCase").value);
  6. CaseUpdateQuery.setParameterValue("Contact", this.get("AlphaContact").value, this.Terrasoft.DataValueType.GUID);
  7. CaseUpdateQuery.setParameterValue("AlphaBeginMood", this.get("AlphaBeginMood").value, this.Terrasoft.DataValueType.GUID);
  8. CaseUpdateQuery.setParameterValue("AlphaEndMood", this.get("AlphaEndMood").value, this.Terrasoft.DataValueType.GUID);
  9. batchQuery.add(CaseUpdateQuery);
  10.  
  11. var ContactUpdateQuery = Ext.create("Terrasoft.UpdateQuery", { rootSchemaName: "Contact" });
  12. var filters2 = ContactUpdateQuery.filters;
  13. filters2.addItem(this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Id", this.get("AlphaContact").value));
  14. ContactUpdateQuery.setParameterValue("MobilePhone", this.get("AlphaContactMobilePhone"), this.Terrasoft.DataValueType.TEXT);
  15. ContactUpdateQuery.setParameterValue("Phone", this.get("AlphaContactPhone"), this.Terrasoft.DataValueType.TEXT);
  16. ContactUpdateQuery.setParameterValue("Email", this.get("AlphaContactEmail"), this.Terrasoft.DataValueType.TEXT);
  17. batchQuery.add(ContactUpdateQuery);
  18.  
  19. batchQuery.execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement