Dll to get the table LicenseCredentials data

SOLVED

Hi all, which dll should I use to get the information of LicenseCredential table?

I found Sage.MMS.SAA.Client.Licence but there is no AccountNumber and SerialNumber field? Please lead me to the correct dll. Thank you

Parents Reply
  • +1 in reply to Geoff Turner
    verified answer

    Yeah, you can get what you need from the class that Geoff mentioned.  if you try to go via the service then you run into problems initialising the paths.  Try this:

    var licence = Sage.Accounting.Application.Licence;
    SoftwareEntitlement softwareEntitlement = licence.SoftwareEntitlement;
    
    string accountNumber = softwareEntitlement.CustomerIdentifier;
    string serialNumber = softwareEntitlement.SoftwareSerialNumber;
    int daysLeft = softwareEntitlement.DaysLeftUntilLicenceExpiry;

Children