Thursday, March 9, 2017

X++ code to Check and Uncheck ExecuteBusinessOperationsInCIL based on userid

Hi Folks,

Today is my post about new concept and trick how to check and uncheck ExecuteBusinessOperationsinCIL based on Userid.

static void CILCHANGE(Args _args)
{
    UserInfo userinfo;
    ttsBegin;
        select forUpdate userinfo where userinfo.networkAlias == "dmsnxtl2.hd1";
    if( userInfo.DebugInfo ==268)
    {
        UserInfo.debuginfo=1292;
        UserInfo.update();
        info(strFmt("CIL Disabled"));
    }
    else
    {
        UserInfo.debuginfo=268;
        userinfo.update();
        info(strFmt("CIL Enabled"));
    }
    ttsCommit;

}

Happy Holli !!!

No comments:

Post a Comment

Export a copy of the standard user acceptance testing (UAT) database

 Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...