Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var lookupId = lueContact.ClientID;
- var defaultField = "Email";
- var defaultOperator = "gt";
- ScriptManager.RegisterStartupScript(this, GetType(), "script_CustomizeLookup", @"
- require(['dojo/aspect', 'Sage/UI/SearchConditionWidget'], function(aspect, SearchConditionWidget) {
- aspect.after(SearchConditionWidget.prototype, '_setToDefaultOperator', function() {
- var lookupId = '%LOOKUP%';
- if (this.id.toLowerCase().substring(0, lookupId.length) == lookupId.toLowerCase()) {
- this._operatorSelect.set('value', '%OP%');
- }
- });
- aspect.after(SearchConditionWidget.prototype, '_setToDefaultField', function() {
- var lookupId = '%LOOKUP%';
- if (this.id.toLowerCase().substring(0, lookupId.length) == lookupId.toLowerCase()) {
- this._fieldNameSelect.set('value', '%FIELD%');
- }
- });
- });
- ".Replace("%LOOKUP%", lookupId).Replace("%FIELD%", defaultField).Replace("%OP%", defaultOperator), true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement