Colors on form

Hi guys, I want to change the background color of the form at the runtime. i.e. whenever user opens a form. The system will check that in which company he has logged in and accordingly the color of the form gets changed. The reason I have to do this. That one of our client is running multiple companies and these companies are having the same codes like the g/l account, customer etc. So, can anybody suggest a solution on this. or if they have anyother idea on this. thx in advance for your valuable time on this. Regards Jag Singh Jagjeet

Don’t change the colours, it does not help, it just agravates the situation. It is common that customers would prefer programming to trainng, it seems easier to them, and it is generally the easy way out for the NSC. Try putting a field on the main menu in a larger font that indicates the company name, this can help. If you really feel you don’t have the ability to , or just plain can’t be bothered, training your client, then try a small button sized colour box at the top right somewhere. But believe me the users will rapidly become anoyed with different coloured screens if you go that route. Hope this helps. _________________________ David Singleton Navision Consultant since 1991 dmks22@comcast.net___________

Hi Jagjeet, I see a few problems with the solution you are seeking: 1. You need to put code on virtually every form or on those required which itself a tedious job. 2. One important thing is that modifications to objects are at database level and not per company level in Navision i.e, they affect all companies in database. Ofcourse You need to find a workaround to handle this. 3. One more disadvantage would be in case a new Co. is created by your client?(You may be able to handle this by defining the color in some Setup) In general considering the disadvantages, evaluate for yourself but here’s how we addressed it for one of our client: We placed a Message in Codeunit 1 to notify a user when a Co. is being opened. This serves the purpose nicely. You can alternately ask for confirmation before a Co. is opened to help address the issue. Regards

I totally agree with David’s comments. As previously suggested just put the company name in BIGGER fonts on the main menu. Also if the company logo is different for each company you could put the logo aswell on the main menu … ######

Just a comment about Company-level development versus Database level. One thing I have done in the past is add a Company Code to the Company Information. This allows for the development of Company Specific mods within one database. Preferably you would want to make this Company Code an Option string to prevent Codes being entered in incorrectly. Just an idea…

Hi, I am totally agree with Tarek, David and Rahimuddin. That user will annoyed of different color on same form in different companies. And also its a very tedious job modifing all the forms. And also I think we cannot change the color of the forms at runtime. We can only change the Forground color of the Controls Only. What I was thinking is to put the company name on the forms which r opened. Do you guy think this is ok. Bcos the problem is what if they had opened 2 or 3 companies on there screen. Thats the main reason we want to go for this option. or Can we do something like this that one user can open only one session at a time. Regards Jagjeet Jagjeet

Hi Larry, You can handle this easily by adding a field in Setup of related functional area and defining whether a particular customization is applicable to a company or not. But let’s not forget that not all things can be customized per company-level. Hi Jagjeet, The solution is ok but if you observe: when a form is maximised in Navision, above the menu bar you’ll see the Name of Co.,Record ID,Card Name, so the functionality is already there. You can modify above display by modifying DataCaptionFields property for related table. Does it serve your purpose? Regards

Hi Jagjeet, If I got you right: The users are opening more than 1 session of Navision and working in different companies. As you know, when a user logs into a database, he can work in one/all companies(if permission is given). If you are looking for how to restrict user from opening multiple Sessions then you may refer to other related requests on the forum. I think you can open a separate topic/request for general issues or issues not related to NA 3.60. Regards

What if the user is colour blind and they think they’re in say the red company but actually they are in the green company… This is not as stupid a point as you may initially think!!

I totally agree with Akers… it is a very valid point. Around 9% of the population is color blind in one way or another. Also, the Navision GUI Guide states clearly “never use color as the ONLY way to express a difference”. In addition, I suspect the users are using other software on their computer. How do they distinguish between difference open documents in, for example, MS Word? By looking at the title bar - which you can also do in Navision. so the feature is already there, why not just use it as it is? Lars Strøm Valsted ------------------------- Why can’t programmers tell the difference between Christmas and Halloween? Because OCT(31) = DEC(25)