Fork me on GitHub
  1. Generate XML string [AX2012]

    Apologies if the logic in produced XML file doesn’t make much sense. I use it merely as an example of some complex XML attributes and nesting.

    The method below returns XML string, which later can be saved as XML file or consumed as a XML string by web services ...

    read more

    There are comments. Feel free to leave your comment.

  2. Checking if a Specific Record Exists in a Table [AX2012]

    As a Method

    Class declaration

    class YourClass
    {
        InventSerial inventSerial;
    }
    

    Method

    public static boolean existsSerial(str 20 _serial)
    {
        return _serial
            && (select firstOnly RecId from inventSerial
                /* index hint GroupIdx //index hint is IGNORED in AX 2012. */
                where inventSerial.InventSerialId == _serial).RecId != 0;
    }
    

    As a Service

    Service data contract attribute

    [DataContractAttribute]
    class YourServiceDataContract ...
    read more

    There are comments. Feel free to leave your comment.

« Page 2 / 2

links

social