Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8177133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:26:05+00:00 2026-06-06T23:26:05+00:00

How can i pass a single parameter between a form in axapta ? I

  • 0

How can i pass a single parameter between a form in axapta ? I want to run a Form B from a clicked button event in a Form A and pass… for example the customer id ?
How can i read it in the destination form, maybe in the init method ?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:26:07+00:00Added an answer on June 6, 2026 at 11:26 pm

    1 Method

    The easiest way is to pass current record. Just change button control’s DataSource value for Example to CustTable if CustTable is in current Form data sources. Then in destination form init method:

    public void init()
    {
        CustTable cTable;
        ;
        super();
    
        // Check for passed arguments
        if( element.args() )
        {
            // get record parameter
            if( element.args().record() && element.args().record().TableId == TableNum( CustTable ) )
            {
                cTable =  element.args().record();            
            }
        }
    }
    

    2 Method

    If you still need pass exactly one value .parm() (or more complex object .parmObject() ) you can do this by overiding source form’s button control clicked method:

    void clicked()
    {
        // Args class is usually used in Axapta for passing parameters between forms
        Args            args;
        FormRun         formRun;
        ;
    
        args = new args();
    
        // Our values which we want to pass to FormB
        // If we want pass just simple string we can use 'parm' method of 'Args' class
        args.parm( "anyStringValue" );
    
        // Run FormB
        args.name( formstr( FormB ) );
        formRun = classFactory.formRunClass( Args );
        formRun.init();
        formrun.run();
        formrun.wait();
    
        super();
    }
    

    Then in destination form init:

    public void init()
    {
        str             anyStringValueFromCaller;
        ;
        super();
    
        // Check for passed arguments
        if( element.args() )
        {
            // get string parameter
            anyStringValueFromCaller = element.args().parm();
    
        }
    }
    

    I should definitely would use only the first method and only in special circumstances would go with #2 method with overriding button click method because this is one of default pattern for passing values between forms.
    More complex example is available at AxaptaPedia.com Passing values between forms

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I pass the result from a scalar [single row, single value] query
I want to pass a parameter to some javascript using a single line of
I can pass a single sort parameter to the search query in pyes like
How I Can pass multiple values in a single parameter to a stored procedure
When working with generators you can only pull out items on a single pass.
in MongoDb I can pass a predicate to an queryable instance for example DataBase.GetCollection<BsonDocument>(entity)
I know that I can pass a string as the second parameter to the
Is there any way that I can pass arguments in selector? example: I have
I want to pass a varying number of parameters between two objects. I have
You can pass special strings into jQuery's Datepicker class setDate() method like +7 which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.