Hii,
How to install extension in one company of same Environment which has two company.
Thank you.
Hii,
How to install extension in one company of same Environment which has two company.
Thank you.
As YunZhu stated, the correct aproach is to make a setup page (card) for the extension where u can activate or deactivate the functionallity per company with a boolean and a procedure to get the enabled state from, in every place that is needed put a:
if not enabled() then exit;
and end the functionallity based on the configuration.
The extension will be installed in all the companies, but the functionallities/pages will have a validation checking if its activated, this way
↑ This is the correct aproach in 95% ~100% of cases
The other 5% could be a personalization extension where specifically u just need 1 functionalitty on 1 company, so u do the if getting the company.
But even in this case i would go with a setup page, for the posibility of new companies in the future.
Hi,
as others have said, extensions are installed for all companies within the same environment.
If you have small blocks of code that should be executed in a company-specific way, you can nest them in an if-clause and check for the current company with
Hi, because of this, developers generally add settings pages to their extensions, which are only valid when the function is enabled.
Thanks.
ZHU
Hi,
Extension works through all the company in the same environment, but yes if you are intent to run any specific code in specific company you can use the method CHANGECOMPANY in your code, see below for more hints.
We cannot. The app installed will execute in all companies.
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156