How to pass a field into a X/C++ method(function)

Posted on 2009-04-22
Last Modified: 2013-11-17
Trying to pass a STRING field into a function to remove carriage returns and return the result.  Not sure how to pass a field in X++/C++, and properly declare everything.

Question by:Damian_Gardner
    LVL 7

    Accepted Solution


    I bilieve this is related to a previous thread:

    Now to answer your question, each table/view in AX has a 'Methods' node.
    By right-clicking on the methods node of the view or table you can override the system methods,
    or you can create new methods of your own.
    Given that the method in question is not static, you can access the fields of the current record
    by using the 'this' object (take a look at the code snippet).

    /// this code prints the name and address of the currently selected record
    void method1()

    Open in new window


    Author Comment

    Ok - this makes sense.  Let me try it and see if I can get it to work.  Thanks very much and standby.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now