/
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;
, multiple selections available,
Related content
Declaration Snippet*
Declaration Snippet*
More like this
Parameter Value Error Snippet
Parameter Value Error Snippet
More like this
Subprocess (without messaging) Error Detection
Subprocess (without messaging) Error Detection
More like this
Messaging Infrastructure
Messaging Infrastructure
Read with this