web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Jump to a specific tab page when opening the form

(0) ShareShare
ReportReport
Posted on by 616

Hi all,

I want to open a specific tab page when the form is opened.

Requirement:

There is a goods receipt posted and this goods receipt is marked to create an inventory quality order. So after posting the InventQualityOrderTable form should be opened with a defined tab page... 

I create an extension class of this InventQualityOrderTable form like:

[ExtensionOf(formStr(InventQualityOrderTable))]
public final class myInventQualityOrderTableFrm_Extension
{
    /// <summary>
    /// additional logic for init()-methode
    /// </summary>
    public void init()
    {
        next init();
 
        if (this.args() && this.args().caller())
        {
            FormTabPageControl ftc = this.design().controlName(formControlStr(InventQualityOrderTable, myQualityReasonTab)) as FormTabPageControl;
            ftc.setFocus();
        }
    }
}

The instanciation of FromTapPageControl works fine but the focus will not be set on this tab page, the opened tab page is standard tab...

Do I have to use another command?

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at
    RE: Jump to a specific tab page when opening the form

    Hi Christian,

    Try the same on the activate method on the form. Use activatePage method instead of setFocus.

    [ExtensionOf(formStr(InventQualityOrderTable))]
    public final class myInventQualityOrderTableFrm_Extension
    {
        /// 
        /// additional logic for init()-methode
        /// 
        public void activate(boolean active)
        {
            next activate(active);
     
            if (this.args() && this.args().caller())
            {
                FormTabPageControl ftc = this.design().controlName(formControlStr(InventQualityOrderTable, myQualityReasonTab)) as FormTabPageControl;
                ftc.activatePage();
            }
        }
    

    Thanks,

    Girish S.

  • Christian Busche Profile Picture
    616 on at
    RE: Jump to a specific tab page when opening the form

    Hi Girish S,

    This is the solution... thank you very much...

    but with all due respect... You write.... Try to use the function activatePage(). Why didn't you write... You MUST use the activatePage() function. SetFocus() does not meet this requirement?

    It must be defined which functions should/must be used for certain actions, right?

    Is there a tutorial somewhere? Did you teach yourself? Do you know this from experience?

  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at
    RE: Jump to a specific tab page when opening the form

    I Just go through the Microsoft documentation and see all the available form and FormTabPageControl methods.

    Form activate method will be called once the form gets focus - In a similar way I thought using activatePage method will solve your issue.

    FormTabPageControlClass methods

    Form methods

    Thanks,

    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans