Created
October 8, 2018 21:19
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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?