Advertisement
RyanFarley

Get Id from Lookup by Name (Creatio)

Dec 15th, 2021
929
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
  2.     rootSchemaName: "ContactType"
  3. });
  4.  
  5. esq.addColumn("Id");
  6. esq.filters.addItem(esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Name", "Customer"));
  7.  
  8. esq.getEntityCollection(function(result) {
  9.     if (result.success) {
  10.         var item = result.collection.first();
  11.         var id = item.values.Id;
  12.         console.log("The Id for Customer on ContactType is " + id);
  13.     }
  14. }, this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement