Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I have a form
form = new Form(utilElements.name);
designObj = form.design();form control
formGroupControl = form.design().control(_formControlId);
formGroupControl = form.design();
controlCount = formGroupControl.controlCount();
for (idx = 1; idx <= controlCount; idx++)
formControl = formGroupControl.controlNum(idx);
How can I get full path to form control like (@"\Forms\HRMEmplMultiJournalTable\Designs\Design\[Tab:Tab]\[TabPage:HistoryTab]\[Group:History]\DateEdit:History_createdDate)?
What do you need it for?
You can right click a control and select Add-ins - Copy - Entire path.
We change Axapta version from ax4 to ax2012. In Ax4 we have some forms with DateEdit control, but field type in Table is DateTime. Now I need to find all controls DeteEdit on forms and chenge them to DateTime. I write the job.
formControlType = SysFormRun::controlType(classidget(formControl));
if (formControlType == FormControlType::Date ||
formControlType == FormControlType::Time)
// ret = full path
info(ret, '', SysInfoAction_newWindow::newTreeNodePath(ret));
When doubleClick in info and I can see the control in form
Ok but what do you need the full path for?
Isn't it enough to know the form name and the control name? You can always find a flat list of all form controls in [Form]\Designs\DesignList.
Yes, I can use only formName and controlName, but it will take a lot of time.
if I have a full path I can do this ->
after double-click will open the form and the DateEdit control will be in focus
I try to use
but in method ctrlId2treeNodePath in the line formControl (fc)
fc = formRun.control(_id);
Did anyone have a similar problem?
What do you have in formRun and _id variables?
Also are you sure it's less work to fight with this code instead of navigating to the controls in the DesignList? After all this is a one time job / upgrade so maybe this small manual extra work is cheaper in the end? And the actual change of the data type is manual anyway. I imagine there's plenty of work to change Dates to DateTime, but this form control change is just a small part of it.
For example navigating to 100 controls using form name and control name would for sure take less than half an hour of time. How long did you spend solving this problem?
Most likely I will do as you advise. I understand why I get an error. While the form is not initialized, search by control code is not possible. Not all forms can be initialized from code, because the init method before super() can be the following code
To solve this problem, I spent 5 hours)
Business Applications communities