Fork me on GitHub
  1. TCP/IP Client (derived from C# to X++) [AX2012]

    Solution

    TCP/IP Client based on an example in my C# code. This example demonstrates how to send a string to TCP/IP Server and receive response back from it. The response is being read in batches.

    The solution can be easily converted to Inbound Service.

    Service data contract attribute ...

    read more

    There are comments. Feel free to leave your comment.

  2. 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.

  3. 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