Notifications
Announcements
No record found.
I want to display list of all forms form AOT Through job.
Suppose i am write a code in job and run this job, i want to print all forms one by one in info log
*This post is locked for comments
There can be many ways. one way is that, you can get list of all forms, from UtilElements view. and you can filter this by UtilElementType
Can you Just tell me the Code for this.
i am trying to write the below code, but i didn't get the macro for forms.
static void daxFormAnalyzer(Args _args)
{
#AOT
#Properties
TreeNodeIterator templateNodes;
TreeNode templateNode;
SysDictType template;
templateNodes = TreeNode::findNode(#UtilElementType).
templateNode = templateNodes.next();
while (templateNode)
info(strFmt("%1 - %2", SysLabel::labelId2String2(findProperty(templateNode.AOTgetProperties(), #PropertyLabel), 'en-us'),
SysLabel::labelId2String2(findProperty(templateNode.AOTgetProperties(), #PropertyHelpText), 'en-us')));
}
you can get these as under
static void ListOfForms(Args _args) { UtilElements localEelmet; UtilEntryLevel LayerName = UtilEntryLevel::usr; TreeNode treeNode; ; while select localEelmet where localEelmet.recordType == UtilElementType::Form && localEelmet.utilLevel == LayerName //remove this line if you want all layers { treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(localEelmet)); info(strFmt("Name: %1",localEelmet.name)); } }
Make sure
1) remove 2nd part of where clause, which is restricting the objects to a specific layer, if you want to get all form names from all layers.
2) you can also add a progressbar, otherwise job can take long time
thank you It is working fine..
i want to display the path name of the every form,,
Example
take custtable listpage form it is used in the AccountsRecievable ->common->customers->All Customers.
for Every form i want to display like this, where it is used.
a form can be located at more than one locations in Rich Client.
e.g. same form custtable, might be located in AccountsRecievable as well the same form might be located in sales & Marketing also.
The list might keep increasing on and on, as you keep on adding a form menu item to a new location in user interface
if you have SDT installed you can see how it builds tree based on selection of role.
can you share your business scenario what you want to do, at end of day from business perspective.
My client wants know where the form is used with navigation.
this is an interesting requirement.
unfortunately I don't have x++ code ready for this to share with you. you can create a new thread or you can wait on this thread for contribution of other contributors.
I am not making any promise but I would try to find time to write code or blog post for this, later by this weekend. this is doable as you can traverse tree nodes
This structure which you mention as an example is going from the AX modules as a starting point. For that what you can do is start iterating through the Menus AOT node. You could start building your string to info out based on the menu/sub-menu structure. For each of them that are not sub-menus, they have a menu item behind that could be referring to a form, class or report (respectively display, action and output menu item types). You could then just get the label of the menu item and append it to the end of the string. This will give you the desired results.
Also do not forget like Sohaib said, AX forms can be opened from a multitude of sources that are not necessarily accessible straight from the menus!
I have done my working already for this 2nd requirement. I will be blogging a post tonight for this, which will provide the required information on 3, 4 clicks.
Hi srinivas pamidi,
you many have a look at blog post
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2