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

Form not saving with Dynamics 365 lookup field

I have 2 entities in D365 "Care Cards" and "Opportunities". I have a field in Care Cards called "Project" that is a lookup field pointing at the Opportunities entity.

 

This is the form from D365 which I want to replicate in PowerApps:

Screenshot (99).png

 

Details of Project field from D365:

Screenshot (98).png

I want to create a form in PowerApps with Care Cards as the data source. Where I am having a problem is with the PowerApps form, it is not saving the lookup field to D365. 

 

https://powerusers.microsoft.com/t5/General-Discussion/Form-not-saving-to-Dynamics-when-using-lookup... I have tried using the solution from this link but can't get it to work correctly. 

 

I have added the 2 available Project fields to the edit form:

Screenshot (100).png

 

For the Project dropdown field I have set Update to blank and SelectMultiple is false:

Screenshot (101).png

 

For the Project GUID field I have set Default to the selected value from the Project dropdown and for Update I have added a Value() function to the Text:Screenshot (102).png

 

When I submit the form it will submit without any error but the Project lookup field will not save, however the text fields do save correctly.

 

I think the problem may be with the Update property, I don't know if the Value function is the correct thing to use. 

 

Any help is greatly appreciated.

 

Thanks

 

Note: I have changed the settings "Use column display names" and "Use GUID data types instead of strings" to off.

1 ACCEPTED SOLUTION

Accepted Solutions
PowerAppBCS
Level: Powered On

Re: Form not saving with Dynamics 365 lookup field

I have been able to get this worked by using Common Data Service as the data source instead of using Dynamics 365 as the data source.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Form not saving with Dynamics 365 lookup field

Hi @PowerAppBCS ,

 

Do you want to save entities’ look up field?

 

I think you can change the project’s  data card’s update property to :

LookUp(Table_Oppotunities,Project = DataCardValue3.Selected.Project)  (DataCardValue3 is my project’s data card name,you should change to yours)

 

I test as next:

Data Source

Table_Oppotunities

20190219lookupentitiesdatasource1.png

20190218CareCard

20190219lookupentitiesdatasource2.png.jpg

App Test:

20190219entitiesapptest1.jpg

 

Result:

1

20190219savelookupfieldresulttest1.gif

2.

20190219resulttest2.png

 

Hope this can be helpful.

Best Regards.

Yumia

 

PowerAppBCS
Level: Powered On

Re: Form not saving with Dynamics 365 lookup field

Hi @v-yuxima-msft,

 

I tried using a LookUp function for the update property but couldn't get it to work. 

 

I'll just run through how I have the edit form set up and it may be clearer what I'm doing wrong:

On my edit form I have 4 fields. 3 text and 1 lookup.

Screenshot (107).png

Initially lookup field is not pointing to correct data:

Screenshot (108).png

To sort this I changed the primary text and search field:

Screenshot (109).png

The edit form now functions as I want it to but when I go to save the form I first get this error:

Screenshot (110).png

And then this error on the submit form:

Screenshot (111).png

 

The 2 errors are "There was a problem saving your changes. The data source may be invalid." and "Expected dataEntityRecord for navigation column"

 

Thanks for your help.

PowerAppBCS
Level: Powered On

Re: Form not saving with Dynamics 365 lookup field

I have been able to get this worked by using Common Data Service as the data source instead of using Dynamics 365 as the data source.

View solution in original post

qidwai
Level: Power Up

Re: Form not saving with Dynamics 365 lookup field

I am having same issue in Canvas app. I don't want to use Common Data Model. any suggestion how to resole this in Canvas app

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,759)