Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Tuesday, January 17, 2012

EP Development in AX 2012



Today, I have watched a very good presentation (http://vimeo.com/26902748) on Enterprise portal Development in AX 2012, given by a friend Zeeshan Jafry, the presentation covered the followed points, and it is a good presentation to have a quick start
  • Basic Installation and configuration of EP
  • Add
       o A new module in EP
       o   List page in that module
       o Quick Launch in that module
       o New web part
       o New EP Page
       o New user control (Web Form, Modal Dialog Form)
                  o http://msdn.microsoft.com/en-us/library/aa855178.aspx


Enterprise Portal is one of the most attractive features of Dynamics AX 2012. Enterprise Portal for Microsoft Dynamics AX provides a Web-based application framework that allows for users to interact with data in Microsoft Dynamics AX through a Web browser

Wednesday, January 4, 2012

Verify the URL Link and the File/Folder path in AX


I have experienced to verify the URL link in AX, Currently AX don’t contains any API that validate the URL Link
I have written a method that verifies the URL
public static boolean WebPathExists(str _url)
{
    boolean                    isExists;
    System.Net.WebRequest      UrlWebReq;
    System.Net.WebResponse     UrlWebRes;

    try
    {
        // Encode the URL first before passing to the Create method
        _url = System.Web.HttpUtility::UrlPathEncode(_url);
        UrlWebReq = System.Net.WebRequest::Create(_url);
        // This is needed if secure link is access like the AX share point portal
        // This is works only for the client calls
        UrlWebReq.set_Credentials(System.Net.CredentialCache::get_DefaultCredentials());
         UrlWebRes = UrlWebReq.GetResponse();
        // if there isn't any exception in the response (passed the above line of code) then the path is  correct.
        isExists  = true;
    }
    catch
    {
        isExists = false;
    }

    return isExists;
}

To checks the existence of Windows directory/File Path, there are some methods available in AX WinAPI class

WinAPI::folderExists(_filePath)
WinAPI::fileExists(_folderPath)