|
How to use your text as suggestion
User List
To add new suggestion, add the following code into \Classes\DEV_AxAssistUserList\addUserList method:
formActiveXControl.addHelpItem(newSuggestion, "" , toolTip, "" , 0, DEV_AxAssistVarType::UserList, 0, 0);
newSuggestion – text of suggestion, for example "info(strfmt(\"%1\", ));",
toolTip – tooltip text.
New suggestion will be appeared in list in according to settings (by default it is enough to enter two first symbols to get suggestion):

Note: new suggestion will be available only after reload of Dynamics AX client (if AxAssist is already running).
Therefore it is recommended to perform these changes before start AxAssist.
Acronyms list
Beginning with version 1.08.0 it is possible to define your own acronym for suggestion.
For example, to correlate acronym “FE” with “fieldExt2Id” in suggestion list you can add the following code into \Classes\DEV_AxAssistUserList\addUserList method:
formActiveXControl.addHelpItem( "fieldExt2Id" , "" , "Returns the fieldId part of an extended FieldId" , "FE" , 0, DEV_AxAssistVarType::ALL, DEV_AxAssistVarType::UserList, 0);
Note: new suggestion will be available only after reload of Dynamics AX client (if AxAssist is already running).
Result:

Function addHelpItem description:
void addHelpItem(str itemName, str itemTypename, str itemTip, str itemAcronym, int id, DEV_AxAssistVarType listType, DEV_AxAssistVarType dataType, int flag);
itemName – text that will be added to list of suggestion (for example, InventTable).
itemTypename – type name corresponding with itemName. Can be used for variables of classes/tables etc. only.
itemTip – tooltip text.
itemAcronym – acronym corresponding with suggestion. If acronym is not defined then standard algorithm for acronym will be used.
Id – ID of element in Dynamics AX or 0 (zero) if element do not have id.
listType – type of suggestion list. Use DEV_AxAssistVarType::UserList for User list. For lists "Name Matching" and "Acronyms" use DEV_AxAssistVarType::ALL.
dataType – inserting data type.
flag – 0 – insert element, 1 – remove all elements from list listType, 2 – refresh element using its id (this value is used to synchronize AOT and AxAssist).
|