Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I created extension of HcmPosition form and now I want to hide some columns on the form.
I was able to make "Visible" property of most fields to No but I have one field and the Visible property is grayed out. Any idea how I can hide this field? See the attached image where the Visible Property is grayed out.
This is referenceGroupControl, you need to set up property at its parent which is HcmPositionHierarchyLine_ParentPositionCopy1.
You can control the property by coding.
Table_ds.object(fieldNum(Table, Field1)).visible(true); This method can change the "visible" through Datasource.
Please create an extension class and put the following codes in it.
You can find the DS and field with the property of the control.
Thank you so much Will. It worked perfect.
Why do you create and extension class and add event handler in it?
Extension classes should not be used for event handlers, as there is a tiny problem with them.
It also gives a best practice warning.
If you need an event handler class remove final keyword and ExtensionOf attribute, and name it something like HcmPositionEventHandlers or something else.
Actually, you can access any control in Extension class just by writing a name of the control and calling the method.
It's not obvious but it works.
This is good if you want to hide just this particular control:
If you want to hide all controls of this field when the code DataSource.object(fieldid).visible(false) is valid.
Just don't use hardcoded strings instead, use formDataSourceStr intrinsic function.
Or use CoC, it's much easier and more readable than event handlers.
Business Applications communities