Showing posts with label dynamics ax 2012. Show all posts
Showing posts with label dynamics ax 2012. Show all posts

Monday, 21 October 2019

Open form from Infolog Dynamics Ax 2012 Open form on message click

Dynamics Ax 2012 Open form from Infolog  
Open form on message click

SysInfoAction_FormRun    infoAction = SysInfoAction_FormRun::newFormName(formStr(CustTable));

infoAction.parmDescription("Open form Customer Details");
infoAction.parmCallerBuffer(CustTable); // automatic dynalink
info("Purchase invoice contains VAT IN. Please record TAX Invoice Number in ID Localization module after this.", "", infoAction);

Thanks,
Vikas Mehta.

GET USERNAME AND SECURITY ROLES IN DYNAMICS AX 2012

GET USERNAME AND SECURITY ROLES IN DYNAMICS AX 2012
display Notes getUserIdAndRoles()
{
    DirPerson               DirPerson;
    DirPersonUser           DirPersonUser;
    SecurityUserRole        SecurityUserRole;
    SecurityRole            SecurityRole;
    Notes                   returnNotes;
    str value;
    ;
  
    DirPerson       = DirPerson::find(this.Person);
    DirPersonUser   = DirPersonUser::findWorker(this.RecId);
    returnNotes      = strFmt("User ID : %1 \n\n ",DirPersonUser.User);
    returnNotes      = strFmt("%1Security Roles : \n",returnNotes);
    
    while select * from SecurityUserRole
        where SecurityUserRole.User == DirPersonUser.User
    join SecurityRole
        where SecurityRole.RecId == SecurityUserRole.SecurityRole
    {
        if(subStr(SecurityRole.Name,1,1) == '@')
        {
            value = SysLabel::labelId2String2(SecurityRole.Name, companyinfo::languageId());
            returnNotes = strFmt("%1 %2\n",returnNotes,value);
        }
        else
        {
            returnNotes = strFmt("%1 %2\n",returnNotes, SecurityRole.Name);
        }
    }
    
    return returnNotes;
}

Wednesday, 27 May 2015

QR Code DAX 2012

static void JobCreateforQRCode(Args _args)
{
Image image;
container imageContainer;
str url;
EFDocQRCode_BR qrCode;

// The url to create the QR code.
url = 'http://www.google.com';

// Create an instance of the QR code class
qrCode = new EFDocQRCode_BR();

// Generate a QR code for the URL and save the result to a container
imageContainer = qrCode.generateQRCode(url);

// Use AX's good old Image class to load the image from the container
// and save it as a file
image = new Image();
image.setData(imageContainer);

image.saveImage("F:\QrCode.jpg", ImageSaveType::JPG);
}

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...