In order for users to get directly to a specific item, I've enabled deep linking via the BrowseScreen1 OnStart property:
If(
!IsBlank(Param("ID")),
Set(
TargetRequest,
LookUp(
'Onboarding Requests',
ID = Value(Param("ID"))
)
);
Navigate(
DetailScreen1,
Fade
),
Set(
TargetRequest,
RequestGallery.Selected
)
)using TargetRequest as the item property in both the DisplayForm1 and EditForm1.
This works fine in all aspects, except for the following
On the EditForm there is a button with its OnSelect property as follows:
Patch(
'Onboarding Requests',
TargetRequest,
{
Coordinator: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department: "",
DisplayName: User().Email,
Email: User().Email,
JobTitle: ".",
Picture: "."
}
},
{
Status: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID: 2,
Value: "Ready to Send to Resource"
}
},
{statusSearchString: "Ready to Send to Resource"}
);
UpdateContext({showPopup: false});
ResetForm(EditForm1);
Refresh('Onboarding Requests')If I select an item from the RequestGallery and edit it , this works fine. It patches the record, the popup goes away and the Coordinator and Status fields show the patched values.
When I use the ?ID=nnn parameter in the URL (which brings me directly to the item in the DisplayForm) and then edit it, it doesn't work properly. It still patches the item correctly, but the fields won't show the new, patched values. If I go back to the gallery I can however see that the patching went fine. What could be the missing point here?