Skip to main content

Notifications

Announcements

No record found.

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 585

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?

  • Verified answer
    GirishS Profile Picture
    27,825 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.

  • Christian Busche Profile Picture
    585 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,825 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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans