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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Why we cannot open the form part by use form.getFormPart('***').openFormPart() when the form part is set to remote form part?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Description:

i have two form (HostFormForm, ChildForm), one form is main form, another is  as a formpart form of main form.

and i set the Run mode of form part as Remote.

now i design a test case which need open the remote form part to test, but it cannot be opened and have a error.

i can not find some info about remote formpart, if you know please tell me why cannot open it? what can i do ?

public void test_Remote_on()
{
    using (var form = FormPartRuntimeStylesTest_HostFormFormAdaptor::open())
    {
        form.setEditMode(false);
        FormPartAdaptor fpa = form.getFormPart('PartRemote');
        using (var partForm = fpa.OpenFormPart())
        {
            // test content
        }
    }
}
        

pastedimage1605084893003v2.png

pastedimage1605084864479v1.png

I have the same question (0)
  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    I think mr Drab wrote something about this on his blog...

    In any case. I am reasonably sure that you can't access or handle the form part from code if you set it to running remote. If I were you I'd set the form part control to local.

    And then I took a screenshot of some code I wrote a while back, to handle a form part (set to run "local"):

    Screenshot-2020_2D00_11_2D00_11-at-12.49.58.png

  • Liya Cheng Profile Picture
    Microsoft Employee on at

    Hi, Pete. i know that we can handle a form part from code if we set it to running local. but why we cannot handle it with remote from code? i cannot find any document about it, can you please show me the blog or explain it ?

    because the test code can passed before, but now it failed in remote form part,

  • Pete Alberts Profile Picture
    3,542 on at

    I think remote means it runs in a different session. Which moves the question away from "why not?" to "how would that be possible?". I first encountered this with Tiles.

    Nevertheless, the point is you can't. Well at least without some sort of high-tech, next-gen type of solution :)

  • Pete Alberts Profile Picture
    3,542 on at

    Oh and it seems like Martin Drab's site is down. But here is a post from Palle Agermarks on the subject. It also mentions the thing about sessions.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans