Filtering current user id at UserInfo table

Background :

We want filter some validation proses based on current user id. We unable do this because the length of character in UserInfo.Id is fix 5 character.

Solution :

Check UserInfo table from SQL Server instance. You cannot open this table from Axapta, its locked. Otherwise, its not on Data Dictionary, but it located on System Documentation > Tables. Make sure, filtering on UserInfo.Id. Check the length of Id column.

Check the code :

if (curuserid() != 'Sepri' ) 
ret = checkfailed(strfmt("Accountnum %1 is not same with Cash Account Petty Cash %2", ledgerjournaltrans.AccountNum, cashaccount));  

About this entry