The code for a licence is generated by Microsoft so you need to check 
with them how you can deploy new modules.

In general the licence key is the base for the security system.
Configuration keys depend on the licence key and Security Keys 
depends on Configuration Keys.

Functions to check are:
if (hasSecurityKeyAccess(securitykeyNum(mySecurityKey), 
AccessType::View)) 

{ 

myMethod(); 

} 

if (hasMenuItemAccess(menuItemDisplayStr(myMenuItem), 
MenuItemType::Display))) 

{ 

myMethod(); 

} 

DictTable dictTable = new DictTable(tablenum(myTable)); 

if (dictTable.rights >= AccessType::Insert)) 

{ 

myMethod(); 

} 

if (isConfigurationkeyEnabled(configurationkeyNum
(myConfigurationKey)) 

{ 

myMethod(); 

} 

br
Karsten

--- In [email protected], "Steve Wright" <[EMAIL PROTECTED]> 
wrote:
>
> There is no point...you can remove your x++ code which does the 
check!
> 
> S
> 
>  
> 
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of gonzalo_edo
> Sent: Saturday, 26 May 2007 9:02 AM
> To: [email protected]
> Subject: [development-axapta] Licence Key validation
> 
>  
> 
> Hi all... 
> 
> Does anybody knows how can I validate if custom a license key is 
> enabled, by example, I develop a complete module and I want to 
enable 
> it only if If enter a valid licence key that I define, so If a 
valid 
> licence key is found, some configuration keys are enable and 
> funcionality and so on...
> 
> In the AOT I can create licence keys, how in code at startup can I 
> validate if this license is active and match with the code I define?
> 
> I don't know if I make myself clear...
> 
> Hope can help me...
> 
> Regards,
> 
> Gonzalo
> 
>  
> 
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to