# Customization based on company in NAV

**URL:** <https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548>\
**Category:** Developers Forum\
**Created:** [February 19, 2010, 12:11pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548 "2010-02-19T12:11:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeepgudipudi](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pradeepgudipudi](https://www.dynamicsuser.net/u/pradeepgudipudi)\
**Post date:** [February 19, 2010, 12:11pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/1 "2010-02-19T12:11:46Z")

</div>

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…??

Regards

Pradeep

---

<div class="post-metadata">

**Author:** ![modric](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@modric](https://www.dynamicsuser.net/u/modric)\
**Post date:** [February 19, 2010, 12:22pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/2 "2010-02-19T12:22:10Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![DRB](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@DRB](https://www.dynamicsuser.net/u/DRB)\
**Post date:** [February 19, 2010, 12:23pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/3 "2010-02-19T12:23:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MattTrax](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/matttrax/32/9408_2.png) [@MattTrax](https://www.dynamicsuser.net/u/MattTrax)\
**Post date:** [February 19, 2010, 12:38pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/4 "2010-02-19T12:38:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pradeepgudipudi](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pradeepgudipudi](https://www.dynamicsuser.net/u/pradeepgudipudi)\
**Post date:** [February 19, 2010, 4:34pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/5 "2010-02-19T16:34:27Z")

</div>

Thank u all for help…!!

---

<div class="post-metadata">

**Author:** ![pradeepgudipudi](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pradeepgudipudi](https://www.dynamicsuser.net/u/pradeepgudipudi)\
**Post date:** [February 19, 2010, 4:34pm UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/6 "2010-02-19T16:34:55Z")

</div>

Thank u all for the reply…!!

---

<div class="post-metadata">

**Author:** ![j.marselo](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@j.marselo](https://www.dynamicsuser.net/u/j.marselo)\
**Post date:** [February 20, 2010, 4:41am UTC](https://www.dynamicsuser.net/t/customization-based-on-company-in-nav/24548/7 "2010-02-20T04:41:51Z")

</div>

Matt,

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?
