Differentiate two companies

j.stalderj.stalder Member Posts: 35
Hi,

I hace created for my users two companies, one for testing and one for the production.

But it's very easy to make a mistake between the two companies and change the data at the wrong place. At the moment the only difference between the two companies are the title in the top bar.

Someone does know a way to differentiate the two companies, witch color or a big text, a different background, any ideas???

Thanks

Joachim

Comments

  • kinekine Member Posts: 12,562
    You can add field into Company Info, in each company selec another option and you can add some Visual identification to somewhere... for example some message showed in some timer for the test company etc... (like "You are in the test database!" each 5 minutes)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • j.stalderj.stalder Member Posts: 35
    Thanks for your idea.

    I createad a form that is displayed after the login, but i'd like to know if it's possible to have this form "always on top"

    Joachim
  • kinekine Member Posts: 12,562
    No, there is not such a property or function...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • themavethemave Member Posts: 1,058
    edited 2005-12-07
    I created a blank form with the form name of

    TEST COMPANY

    I then added this form to the all the user menus so each menu as a few lines that say

    TEST COMPANY

    It is not a pop up box, but it is always there and easy to see.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    themave wrote:
    I created a blank form with the form name of

    ******TEST COMPANY *******

    I then added this form to the all the user menus so each menu as a few lines that say

    ******TEST COMPANY *******

    It is not a pop up box, but it is always there and easy to see.

    This is a nice tip. 8)

    You don't even have to create a form. Just link form 1 (Comp Info) and change the caption.
  • SavatageSavatage Member Posts: 7,142
    Here's another post
    http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=11449

    I guess everybody has there own way :wink:

    You could always use the "Blinking Code" :whistle:
    http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=12654
  • davmac1davmac1 Member Posts: 1,283
    Sometimes people just don't pay attention.
    A long time ago, I took a short cut on a print alignment on a mailout form and used the address from the first record and just substituted the person's name with TEST PRINT.
    The computer operators did not remove the test print forms and they were mailed out. Mr Test Print then called and complained.
    (He did receive the properly addressed form too.)
  • themavethemave Member Posts: 1,058
    Ok, here is something you can do that is almost full proof,

    change the allowed to posting dates to a far back period.

    Tell your users that to post in the test company they have to change the posting date to 1/1/2001. If not it won't post.

    You could possibly change the pop up error message for the test company to say, instead of date error it could say you are in the test company, if you really want to post this, go the live company or else chagne the date.

    But even if you didn't do that, just the standard error message would stop most incorrect posting.
  • SavatageSavatage Member Posts: 7,142
    themave wrote:
    Ok, here is something you can do that is almost full proof,

    Tell your users that to post in the test company they have to change the posting date to 1/1/2001. If not it won't post.

    Almost =; as long as you "leave it up to" someone to "remember" something there is always a chance for error.
    We've probably all had to deal with stupid users.
    User->My Monitor is broken.
    Me->Press the ON button.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Savatage wrote:

    We've probably all had to deal with stupid users.
    User->My Monitor is broken.
    Me->Press the ON button.

    :mrgreen: =D>

    So True
  • DenSterDenSter Member Posts: 8,307
    well if you set the allow posting to date to 3 years back it will be impossible to post anything, and what are you going to do then? Changing the workdate back 3 years puts you into a closed period, and that's not going to work either.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Pop question: 8-[

    How are you going to test if you cannot post; :?
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Put a message in Codeunit 12


    YOU ARE IN THE TEST DATABASE

    :mrgreen:

    OR

    ERROR('User error, please replace user'); O:)
  • krikikriki Member, Moderator Posts: 9,118
    Savatage wrote:
    We've probably all had to deal with stupid users.
    User->My Monitor is broken.
    Me->Press the ON button.
    Or:
    user->My computer doesn't work
    helpdesk->check the ON button ; check if the electricity-cable is connected
    user->I can't check the cable, it is dark, we don't have electricity
    :mrgreen:

    see also http://www.mibuso.com/forum/viewtopic.php?p=34637#34637
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • krikikriki Member, Moderator Posts: 9,118
    In versions prior to 4.00, you can change the background colour of the main menu.

    For version 4.00+: (just came up with this idea).

    Create a SingleInstance codeunit with a global in it:
    global : LastTestDateTime : DateTime
    IF NOT (COMPANYNAME IN ['Test Company 1','Test Company 2'] THEN
      EXIT; // IMPORTANT : of course you also have to change name of the companies in the testcompany.
      
    IF LastTestDateTime = 0DT THEN
      LastTestDateTime := CURRENTDATETIME;
      
    IF LastTestDateTime + 2000 > CURRENTDATETIME THEN
      EXIT; // show a message every 2 seconds. This is needed because if you post an invoice with 10 lines, you don't want a message for each line.
    
    MESSAGE('You are in a TESTCOMPANY');
    LastTestDateTime := CURRENTDATETIME;
    

    Put the test in the lowest codeunits (12,22,...). Meaning the codeunits that are always called (eg. in C80 or C90 it is not necessary, because they call C12 or C22 or so on. In this way, you have to add the code in less places and you can keep the code also in the production DB, the performance-loss is measured in microseconds (disk-acces is measured in milliseconds).

    use: In the places you want to test, put
    CODEUNIT.RUN(CODEUNIT::"Am I In Test DB");
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.