Access to License Information???

AmaraaAmaraa Member Posts: 153
Hello experts,

I have a question about the license.
Can I have an access to license info's "Company Info" and write a codeunit that says "This database can be opened only with .... Company License" ???

And I need an bug for myself that only I can access to that database with other license?

Please, Help!!!
Amaraa

Answers

  • BeliasBelias Member Posts: 2,998
    i can't understand what are you trying to achieve...the table of license info is "license information" (you can see it creating a new form based on this table.
    Amaraa wrote:
    And I need an bug for myself that only I can access to that database with other license?
    what does this mean? you WANT a bug?!?!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • JPHSCJPHSC Member Posts: 67
    I think i understand what you are trying to achieve. You want to secure that the user uses the correct licence. But I would be carefull, if there is 1 database with multiple Company's you have a problem. And, if you make this hard coded you can never load in your developers licence... Tricky indeed.

    But, i think here is your answer :
    Take a look at the (virtual) table "Licence Information". On line 5 you find the company name.
    hint :
     lrecLicenseInfo.GET(5);
     ltxtCompanyName := COPYSTR(lrecLicenseInfo.Text, STRPOS(lrecLicenseInfo.Text, ':') + 2);
    

    My opinion :
    If you would like to make a test like this, fill in the licence no. in the company information table (make a custom field) an get the licence no (see code above, line no. 4). This way you can have multiple company's or when the company name is not exact the same as in the licence. And I would make this test user dependand, so you can allways load your developers licence.

    Anothes question, why would you like to do this??
  • AmaraaAmaraa Member Posts: 153
    JPHSC wrote:
    I think i understand what you are trying to achieve. You want to secure that the user uses the correct licence. But I would be carefull, if there is 1 database with multiple Company's you have a problem. And, if you make this hard coded you can never load in your developers licence... Tricky indeed.

    But, i think here is your answer :
    Take a look at the (virtual) table "Licence Information". On line 5 you find the company name.
    hint :
     lrecLicenseInfo.GET(5);
     ltxtCompanyName := COPYSTR(lrecLicenseInfo.Text, STRPOS(lrecLicenseInfo.Text, ':') + 2);
    

    My opinion :
    If you would like to make a test like this, fill in the licence no. in the company information table (make a custom field) an get the licence no (see code above, line no. 4). This way you can have multiple company's or when the company name is not exact the same as in the licence. And I would make this test user dependand, so you can allways load your developers licence.

    Anothes question, why would you like to do this??

    Could you please, be more detail?
    Yes, I'd like to try that.
  • JPHSCJPHSC Member Posts: 67
    Add a field in the company info table .. ( Licence No. = text) And a field on the user setup table ( check company licence = bool) ..
    If the user setup checks that company licence is true then you will check the used licence no. vs. the licence no. in the company information table.
    Do this in Codeunit 1 - loginstart...

    The main question = WHY !! ?
  • matttraxmatttrax Member Posts: 2,309
    This has come up a number of times over the past few weeks. This solution does not sound good. In fact, it sounds REALLY bad.

    If you have a customer that is using a partner license or any license that does not belong to them, 1) Tell them to stop, 2) Tell them to stop again, and 3) Tell Microsoft if they don't.

    When a customer uses a partner license to run their business they are STEALING. The actual value of a partner license is not cheap.
  • kapamaroukapamarou Member Posts: 1,152
    matttrax wrote:
    This has come up a number of times over the past few weeks. This solution does not sound good. In fact, it sounds REALLY bad.
    :thumbsup:
    JPHSC wrote:
    Do this in Codeunit 1 - loginstart...

    So would this prevent the customer from:

    a) Close Company -> Change License -> Edit any object incl. Codeunit 1?
    b) Open Database -> Don't Open Company -> Edit any object with other license?

    Could you tell us the reason behind this? Is it about data or objects?
  • JPHSCJPHSC Member Posts: 67
    That is correct, you can remodify the objects without logging in to a company ( not using loginstart)... That passed me by for a moment.

    But i can understand the problem. If you customer hires someone else ( former employee ) and he uses your developing licence, you want to stop this. Because it will take some time for microsoft to take action, and if the customer is big enough ( = $$$$)) microsoft won't probably do or say anything.. So you are completely on your own.
  • kapamaroukapamarou Member Posts: 1,152
    JPHSC wrote:
    Because it will take some time for microsoft to take action, and if the customer is big enough ( = $$$$)) microsoft won't probably do or say anything.. So you are completely on your own.

    And can MS obtain a warrant to search the customer's premisses?

    I think you should initially make sure that the customer doesn't get his hands on the pertner license.

    If he does then... wait for it to expire...
  • David_SingletonDavid_Singleton Member Posts: 5,479
    You can't write code in Navision to stop a developer accessing the code, since they can just open the object and edit it out. Of course you can write a hack, but it will come back and bite you one day.

    Also is you hacked it, what do you do when another partner with a legal and genuine license comes to do some work for the client. You can't prevent that can you.

    Listen to the advise given. Talk to your client and explain what is going on.
    David Singleton
  • matttraxmatttrax Member Posts: 2,309
    Agreed. There's a reason things are the way they are in Navision. Too many scenarios to try to deal with, and that don't need to be dealt with, here.

    What if the customer lapses on their enhancement fee and chooses to repurchase the product instead of back-paying? They get a new license...are they just supposed to throw away their existing database?

    As David points out, the partner that implements the system is not always the partner or person working on it. Consultants and freelancers are very common. "Hiding" code and doing things to prevent others from working in the system is wrong.

    There are plenty more. Navision is essentially an open source project in each company. That's the beauty of it. Anyone who knows the base product can come in and help out...using whatever license they have permission to use.
  • AmaraaAmaraa Member Posts: 153
    JPHSC wrote:
    Add a field in the company info table .. ( Licence No. = text) And a field on the user setup table ( check company licence = bool) ..
    If the user setup checks that company licence is true then you will check the used licence no. vs. the licence no. in the company information table.
    Do this in Codeunit 1 - loginstart...

    The main question = WHY !! ?
    It is about changing the objects. If it works then I will try. About restricting the object changing.

    Its chopping my head! #-o
  • AmaraaAmaraa Member Posts: 153
    JPHSC wrote:
    Add a field in the company info table .. ( Licence No. = text) And a field on the user setup table ( check company licence = bool) ..
    If the user setup checks that company licence is true then you will check the used licence no. vs. the licence no. in the company information table.
    Do this in Codeunit 1 - loginstart...

    The main question = WHY !! ?
    It is about changing the objects. If it works then I will try. About restricting the object changing.
    Sorry, but how can I know used license no.?

    Its chopping my head! #-o
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Good lick Amarra you are on your own. ](*,)
    David Singleton
  • JPHSCJPHSC Member Posts: 67
    in dutch we would say : eigenwijs is ook wijs :lol:
  • jannestigjannestig Member Posts: 1,000
    From my time in holland i would say they spit itor cough it at least :)

    Blackadder joke " you need a umbrella just to ask for directions"
  • SPost29SPost29 Member Posts: 148
    From Help SERIALNUMBER is the License No.

    SERIALNUMBER (Database)
    Use this function to return a string which contains the serial number of the license file for your Microsoft Dynamics NAV system.

    String := SERIALNUMBER;
    String

    Data type: text constant or code

    This string contains the serial number.

    Example
    The following C/AL code shows how to use the database.SERIALNUMBER function.

    SN := SERIALNUMBER;
    MESSAGE(Text000 + Text001, SN);

    Create the following text constants in the C/AL Globals window:

    Text Constant
    ENU Value

    Text000
    'The serial number for this\'

    Text001
    'software package is: %1'


    The serial number is, of course, dependent on your licensed version of Microsoft Dynamics NAV. The serial number shown here is just an example.

    The serial number for this
    software package is: W1-ZA-002-6R75A-7
  • AmaraaAmaraa Member Posts: 153
    SPost29 wrote:
    From Help SERIALNUMBER is the License No.

    SERIALNUMBER (Database)
    Use this function to return a string which contains the serial number of the license file for your Microsoft Dynamics NAV system.

    String := SERIALNUMBER;
    String

    Data type: text constant or code
    Thanks I will try that
  • DenSterDenSter Member Posts: 8,304
    SPost29 wrote:
    SERIALNUMBER is the License No.
    I never knew this, that's a nice bit of trivia :thumbsup:
  • AmaraaAmaraa Member Posts: 153
    One more question.

    How can I close the database or company from the codeunit?
    The class in applmanagement (like companyclose, loginend) doesn't affect to the company opening thing.
    exit doesn't work neither.
    it just open whatever I say to not.

    Do you have any ideas? please :cry:
  • HanenHanen Member Posts: 281
    How can I do to know what's the number of connexion permitted in a license navision???
    Regards

    Hanen TALBI
  • BeliasBelias Member Posts: 2,998
    file->database->information->Sessions tab
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.