Skip to content

Instantly share code, notes, and snippets.

@joebordes
Created June 26, 2017 23:47
Show Gist options
  • Select an option

  • Save joebordes/21e17bfdbabdb6b4593e003c8f22b010 to your computer and use it in GitHub Desktop.

Select an option

Save joebordes/21e17bfdbabdb6b4593e003c8f22b010 to your computer and use it in GitHub Desktop.
coreboscrm: Get crmid from KUI company lead field on select
diff --git a/Smarty/templates/EditViewUI.tpl b/Smarty/templates/EditViewUI.tpl
index 6aa464f..4e44736 100644
--- a/Smarty/templates/EditViewUI.tpl
+++ b/Smarty/templates/EditViewUI.tpl
@@ -123,7 +123,10 @@ alt="{'LBL_CLEAR'|@getTranslatedString}" title="{'LBL_CLEAR'|@getTranslatedStrin
</td>
<td width=30% align=left class="dvtCellInfo">
<input type="text" name="{$fldname}" id="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
- {if isset($AccountContactLead_Duplicates_Hint) && $AccountContactLead_Duplicates_Hint eq 'yes'}
+ {if true}
+ <link href="include/kendoui/styles/kendo.common.min.css" rel="stylesheet" />
+ <link href="include/kendoui/styles/kendo.default.min.css" rel="stylesheet" />
+ <script src="include/kendoui/js/kendo.web.min.js"></script>
<script type="text/javascript">
{literal}
jQuery(document).ready(function() {
@@ -140,6 +143,12 @@ alt="{'LBL_CLEAR'|@getTranslatedString}" title="{'LBL_CLEAR'|@getTranslatedStrin
dataType : "json",
}
}
+ },
+ select: function(e) {
+ var item = e.item;
+ var text = item.text();
+ console.log(e.sender.dataSource._data[item.index()].crmid);
+ console.log($('#company').data("kendoAutoComplete").dataSource._data[item.index()].crmid);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment