Santosh.'s profileDynamics AxPhotosBlogLists Tools Help

Blog


    October 28

    Difference b/w SELECT AND FIELDSELECT in Dynamics AX

     

    Hi,  

    X++ contains special language feature (i.e. embedded SQL).So we use select query in X++ directly to fetch/retrieve data.

    SELECT in Dynamics AX can be distinguished into two types.

    ·         normal Select

    ·         field Select

    There is a difference between a normal select statement and a field select statement:

    field select statement

                   normal select statement

    This operates directly on a table. So table buffer need not be instantiated.

    This operates on a table buffer variable. So table buffer should be instantiated.

    Only the particular field is selected from the table.

    Whereas in normal select, entire table fields are selected.

    SQL statement:

    (CustTable) SELECT A.ACCOUNTNUM, A.RECID FROM CUSTTABLE A WHERE (DATAAREAID=?) ORDER BY A.DATAAREAID,A.ACCOUNTNUM [ID=11910, Reused=Yes]

    SQL statement:

    (CustTable) SELECT TOP 1 A.ACCOUNTNUM,A.NAME,A.ADDRESS,A.PHONE,A.TELEFAX,A.INVOICEACCOUNT,

    A.CUSTGROUP,A.LINEDISC,A.PAYMTERMID,A.CASHDISC,A.CURRENCY,

    A.INTERCOMPANYAUTOCREATEORDERS,A.SALESGROUP,

    A.BLOCKED,A.ONETIMECUSTOMER,A.ACCOUNTSTATEMENT,

    A.CREDITMAX,A.MANDATORYCREDITLIMIT,

    A.DIMENSION,A.DIMENSION2_,A.DIMENSION3_,A.VENDACCOUNT,

    A.TELEX,A.PRICEGROUP,A.MULTILINEDISC,A.ENDDISC,

    A.VATNUM,A.COUNTRYREGIONID,A.INVENTLOCATION,

    A.DLVTERM,A.DLVMODE,A.MARKUPGROUP,A.CLEARINGPERIOD,

    A.ZIPCODE,A.STATE,A.COUNTY,A.URL,A.EMAIL,A.CELLULARPHONE,

    A.PHONELOCAL,A.FREIGHTZONE,A.CREDITRATING,A.TAXGROUP,

    A.STATISTICSGROUP,A.PAYMMODE,A.COMMISSIONGROUP,

    A.BANKACCOUNT,A.PAYMSCHED,A.NAMEALIAS,A.CONTACTPERSONID,

    A.INVOICEADDRESS,A.OURACCOUNTNUM,A.SALESPOOLID,A.INCLTAX,

    A.CUSTITEMGROUPID,A.NUMBERSEQUENCEGROUP,A.LANGUAGEID,

    A.PAYMDAYID,A.LINEOFBUSINESSID,A.DESTINATIONCODEID,

    A.GIROTYPE,A.SUPPITEMGROUPID,A.GIROTYPEINTERESTNOTE,

    A.TAXLICENSENUM,A.WEBSALESORDERDISPLAY,A.PAYMSPEC,

    A.BANKCENTRALBANKPURPOSETEXT,A.BANKCENTRALBANKPURPOSECODE,

    A.CITY,A.STREET,A.PAGER,A.SMS,A.INTERCOMPANYALLOWINDIRECTCRE80,

    A.PACKMATERIALFEELICENSENUM,A.TAXBORDERNUMBER_FI,

    A.EINVOICEEANNUM,A.FISCALCODE,A.DLVREASON,

    A.FORECASTDMPINCLUDE,A.GIROTYPECOLLECTIONLETTER,

    A.SALESCALENDARID,A.CUSTCLASSIFICATIONID,A.INTERCOMPANYDIRECTDELIVERY,

    A.ENTERPRISENUMBER,A.SHIPCARRIERACCOUNT,A.GIROTYPEPROJINVOICE,

    A.INVENTSITEID,A.ORDERENTRYDEADLINEGROUPID,A.SHIPCARRIERID,

    A.SHIPCARRIERFUELSURCHARGE,A.SHIPCARRIERBLINDSHIPMENT,

    A.PARTYTYPE,A.PARTYID,A.SHIPCARRIERACCOUNTCODE,A.PROJPRICEGROUP,

    A.GIROTYPEFREETEXTINVOICE,A.SYNCENTITYID,A.SYNCVERSION,A.SALESDISTRICTID,

    A.SEGMENTID,A.SUBSEGMENTID,A.RFIDITEMTAGGING,A.RFIDCASETAGGING,

    A.RFIDPALLETTAGGING,A.COMPANYCHAINID,A.MAINCONTACTID,A.COMPANYIDSIRET,

    A.COMPANYIDNAF,A.IDENTIFICATIONNUMBER,A.PARTYCOUNTRY,A.PARTYSTATE,

    A.ORGID,A.PAYMIDTYPE,A.FACTORINGACCOUNT,A.PBACUSTGROUPID,

    A.MODIFIEDDATETIME,A.CREATEDDATETIME,A.RECVERSION,

    A.RECID, A.MEMO FROM CUSTTABLE A WHERE ((DATAAREAID=?)

    AND (ACCOUNTNUM LIKE? ESCAPE '\' )) [ID=11873, Reused=Yes]

     

    Example:

    Sample job is illustrated above. Have a hAppYyYyYyYyYy dAxzinggggggggg Angel emoticon

    October 16

    Get File Encoding in Dynamics AX using X++

     

    Hi All,

    Recently there was an interesting query from one of the technical forum.

    Publisher: http://objectmix.com/axapta/789064-get-file-encoding.html

    Question: How to get encoding file format from xml in Dynamics AX?

    Answer: I have created a small class which would retrieve the encoding format of an Xml.

    Approach Followed:

    ·         Class receives input file as string.

    ·         Based on the input file, the XmlReader is initialized.

    ·         Xml is read using read () method from XmlReader

    ·         When xmlReader.name () is equal to the XmlEncodingAttribute then encoding format is returned.

    Path: http://cid-264a0056cbcbb1d3.skydrive.live.com/self.aspx/.Public/Class%5E_RetriveXMLEncodingFormat.xpo

    Second part of question is possible convert it to ANSI before reading?

    Instead of trying to convert a file in ANSI it would be better we use Binary class to read and write data in the binary format even though if there is special character in the file.  Since reading with ASCIIIO will only support NON ASCI character so binary is the better option.

    Here is the sample example using BinData kernel class:

    Happy DaxingggggggggLeft hugRight hug

    October 01

    Conduit - Customize Your Own Toolbar

     

    Note: Please feel free to use them for your own use with discretion.

     

    Hi All

    I have become a user in Conduit!

    Well what is Conduit?

    It’s a free website which allows creating/customizing your own Toolbar. So we can create our own free custom toolbar and stay connected to users even if they are surfing other website.

    I have created my own toolbar for Dynamics AX which has my blog link as AX icon  at the extreme left corner of the toolbar. Here is the sneak-peak of the toolbar which I have designedJ

     

    You can also download my Toolbar for your IE or any other browser from the following link

    http://dynamicsax.ourtoolbar.com/

     

    Having your own toolbar is always a joy J Why can’t we have it one? Happy dAXinG..................................Smile