I am in the process of migrating an AX2012 application to AX7.
The old application made use of the label editor to allow the user to do a text search for label IDs.
I am creating a new "Label Search" form, and I'm trying to actually DO the search. I've done some research online, and found how several sites say it's done in AX2012. I'm trying it in AX7, but the search never returns any results. Here is the code I'm using:
str searchText = LabelSearchEdit.text();
str searchLang = LanguageComboBox.getText(LanguageComboBox.selection());
str currLabelID = null;
List labelIDs = new List(Types::String);
Label lbl = SysLabel::getLabelInstance(searchLang);
// Do the work of searching for the label
currLabelID = lbl.searchFirst(searchText);
while (currLabelID != null)
{
// Add the ID to the list
labelIDs.addEnd(currLabelID);
// Search for the next one
currLabelID = lbl.searchNext();
}
I'm getting proper values from the controls on my form, but the searchFirst() method is always returning an empty string. Am I missing something, or is this is another one of those APIs that is not deprecated in AX7, but not actually implemented either?
*This post is locked for comments
I have the same question (0)