Announcements
Hi all,
thanks Sergei
Hi @rp@n,
The parameter approach will work in all cases.
isLegalEntityInCountryRegion approach will not work if you have several legal entities for the same country, but you want to enable a feature only for one of these legal entities.
thanks Sergei,
finally one thing , as you said the below code is suitable for my scenario
//Form init method
#ISOCountryRegionCodes
field.visible(!SysCountryRegionCode::isLegalEntityInCountryRegion([#isoJP]));
kindly let me know in which scenario the above code or parameter form concept as dicussed will not work ?
Hi @rp@n,
Yes, it's a more flexible approach comparing to hardcoded country-region. In case if you want to activate these fields for Japan in the future you just go to parameter form and activate it (no further development).
thanks sergei,
i also like you suggestion, to add some parameters in Parameter form. So, based on the check yes or no we can put validation based on legal entity.
can i do that also?
Hi @rp@n,
Yes, it will work in this case.
Hi @rp@n,
Ok , I see. Then I agree with Sergei.
You can refer this:
daxmusings.codecrib.com/.../creating-country-specific-features-in.html
ok, thanks
one more thing, kindly clarify me on this
see i have 4 legal entities
legal entity 1 country US
legal entity 2 country China
legal entity 3 country Germany
legal entity 4 country Japan
shall i use the above code for my requirements ?
Hi @rp@n,
If it's related to country-specific functionality (Japan), I suggest to use SysCountryRegionCode::isLegalEntityInCountryRegion
//Form init method #ISOCountryRegionCodes field.visible(!SysCountryRegionCode::isLegalEntityInCountryRegion([#isoJP]));
hi Blue and Sergei,
basically my requirement is like for example --
module - Product information management
form - Released products
Note - Customer don't wants some customized fields in the form Released product.,those customized fields are used in other legal entities as well.
like for other module also like AR,AP, Inventory etc...
So, i wants to hide those ( customized fields) from particular form based on legal entity.
for Japan legal entity - wants to hide those customized fields
for other legal entities - visible as it is.
i hope it's clear now.
kindly let me know the best approach please
please give me more shed on this.
André Arnaud de Cal...
294,060
Super User 2025 Season 1
Martin Dráb
232,858
Most Valuable Professional
nmaenpaa
101,158
Moderator