Customization based on company in NAV

Hi everyone,

Imagine a database having two companies A and B of different busines application in NAV. I just wrote some code in an object for company A and if i execute the same object for company B the code written for company A should not execute for company B. Is there any possibility in NAV…??



In one database these Objects are common to ALL companies.

You need 2 different DBs, each with different objects. If you will try to hardcode different logic depending on Company name, sooner or later youll be in deep trouble…

One of the possibilities is to Hard code the company names in code, which I believe is poor design (poor way of coding):

IF CompanyName=A THEN

ELSE IF …etc…

Edit: I totally agree with Modris. Modris, i saw your reply after posting mine, difference of seconds in posting.

I posted a reply on Mibuso to your question. It can be done by adding parameters to the functional area setup tables and forms. If the box is checked in company A, the code executes in company A. If it’s not, then the code doesn’t.

Thank u all for help…!!

Thank u all for the reply…!!


my abstraction is so weak and i can not visualize clearly your suggestion.

is it like adding a checkbox in Company table:
AllowCustomization : [ ]

then starting every block of code lines with something like:
if companyinformation.allowcustomization then begin …

if it’s true, i’m not sure this will work.

but, i may wrong in understanding your points. Can you please describe further?