/
License Test Snippet*
License Test Snippet*
This snippet should be added to a first line of code after declarations to check license validity.
Prerequisites:
Prolog:
cCubParam = '}APQ Settings';
Prolog:
If( CellGetN( cCubParam, 'Customer Name', 'Numeric' ) + CellGetN( cCubParam, 'Customer Key', 'Numeric' ) < 2 );
nErrors = nErrors + 1;
sMessage = 'Product license is not valid, please set customer key in }APQ Settings!';
sSequenceID = NumberToString( nMultiMsgJSON );
sMessageJSON = INSRT(' "message":"', sMessage | '"', 1);
sMultiMsg = Expand( '%sMultiMsg%' | If(LONG(sMultiMsg)=0, '', ', ') | '"' | NumberToString( nMultiMsgJSON ) | '":{%sMessageJSON%}' ); nMultiMsgJSON = nMultiMsgJSON + 1;
LogOutput( cMsgErrorLevel, Expand( cMsgErrorContent ) );
ProcessBreak;
EndIf;