Skip to content

Instantly share code, notes, and snippets.

@cgillis-aras
Created October 8, 2018 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgillis-aras/af631acc38dc82c045c16d7e87293a43 to your computer and use it in GitHub Desktop.
Save cgillis-aras/af631acc38dc82c045c16d7e87293a43 to your computer and use it in GitHub Desktop.
Sample code for overriding the default server call that generates the type-ahead for an Item Field
// Get the field we want to populate dynamically
var item = getFieldComponentByName('owned_by_id');
// Override the default server call
item.component.request = function() {
var itemType = this.state.itemType;
var maxCount = this.state.maxItemsCount;
var label = this.state.label;
var req =
'<Item type="' + itemType + '" select="keyed_name" maxRecords="' + maxCount + '" action="get">' +
'<keyed_name condition="like">' + label + '*</keyed_name>' +
// Add our extra filters to this call
'<is_alias>1</is_alias>' +
'</Item>';
return ArasModules.soap(req, {async: true});
}
@sundar62
Copy link

sundar62 commented May 24, 2022

@cgillis-aras - I am trying to use the above on the relationship grid for "Team Members" against the "Team Role" column. However I am not finding success. would you know of way to leverage the above for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment