Country region specific condition in AX 2012 / D365FO
There is two way to restrict your customization with the country region.
- Code Level Restriction
- Elements Level Restriction
Code Level Restriction
Below is a code & Screenshot sample to restrict#ISOCountryRegionCodes
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoPK]))
{
// TODO
}
Elements Level Restriction
Below is the element property & Screenshot sample to restrict.In this blog, we are using output menu items to implement country-specific restriction
Select Menu Item properties and Enter Country Code in country region code Property.
Screenshot sample
Now Build Your D365 Model and verify... Your code will execute and the element will show only if your company address is set as PAKISTAN.
No comments:
Post a Comment