cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kockafella
Level: Powered On

Patch than Navigate

Hey Folks, i have a little problem and hope you can help me. I already tried to google it, but without success.

 

So, basically i want to create a new item in a sharepoint list based on an outlook calendar item, then navigate to the newly created item. I already managed to create the new item. But after calling the "Navigate" method, the Edit Screen displays a ohter item, not the one created. 

 

The OnSelect Command looks like this:

 

Patch(
    'Job Report';
    Defaults('Job Report');
    {
        Titel: ThisItem.Subject;
        CustomerName: "Test"
    }
);;
Navigate(
    EditScreen1;
    ScreenTransition.Fade
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Patch than Navigate

The question is not so much what the navigate command looks like, but what the Items property of the form you are navigating to has in it. The patch() function returns the newly created record when you patch it.  So what you need to do is save that return value in some way and use it in Items on the Form you are navigating to.  Try the following modifed code for your Navigate statement and then set the Items property of the form in EditScreen1 to 'patchrecord'

Navigate(
    EditScreen1;
    ScreenTransition.Fade;
    SetContext({patchrecord:Patch(
        'Job Report';
        Defaults('Job Report');
        {
            Title: ThisItem.Subject;
            CustomerName: "Test"
        }
    }
))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Patch than Navigate

The question is not so much what the navigate command looks like, but what the Items property of the form you are navigating to has in it. The patch() function returns the newly created record when you patch it.  So what you need to do is save that return value in some way and use it in Items on the Form you are navigating to.  Try the following modifed code for your Navigate statement and then set the Items property of the form in EditScreen1 to 'patchrecord'

Navigate(
    EditScreen1;
    ScreenTransition.Fade;
    SetContext({patchrecord:Patch(
        'Job Report';
        Defaults('Job Report');
        {
            Title: ThisItem.Subject;
            CustomerName: "Test"
        }
    }
))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Kockafella
Level: Powered On

Re: Patch than Navigate

This worked for me. I had to redesign the EditForm but now i managed to create, open and modify the data 🙂

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,161)