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

Form not saving to Dynamics when using lookup fields

Hi,

 

I have a powerapp which is connected to a Dynamics 365 instance. The app has two forms, which contain Lookup fields. Whenever I'm adding these fields to the forms, the app is not able to update/create new records anymore. When trying to create a new record I'm getting the "There was a problem saving your changes, the data source might be invalid." message once, and then nothing else. When updating, I don't get any error message but nothing happens.

 

When I remove these lookups from the form, however, everything works normally. I occasionally have an error message on the Save button, "expected dataentityrecord for navigation column".

 

What is really strange is that we have the same setup in another instance, but the Dynamics source is a CDS one. All entites/fields and forms are the same, this one is working but not the one which doesn't use CDS.  Any thoughts ? Thanks.

 

P.S : I've attached two screenshots contrasting both instances

1 ACCEPTED SOLUTION

Accepted Solutions
Yann_SP
Level: Powered On

Re: Form not saving to Dynamics when using lookup fields

I've found the solution (Thank you @Tizzy ), I leave it here in case someone needs it:

 

In order to use a lookup field on a form, we need the Combobox field and its related Textbox field:

 

  • The Combobox Card (not the Combobox itself) needs to have the Update property blank, and SelectMultiple to false.
  • The Textbox field needs to have the Default property set to the ID field (it should be a GUID) of the Combobox’s selected record, and the Update property set to its own Text property

 For esthetic purposes the Textbox fields can be hidden.

View solution in original post

4 REPLIES 4
Yann_SP
Level: Powered On

Re: Form not saving to Dynamics when using lookup fields

I've found the solution (Thank you @Tizzy ), I leave it here in case someone needs it:

 

In order to use a lookup field on a form, we need the Combobox field and its related Textbox field:

 

  • The Combobox Card (not the Combobox itself) needs to have the Update property blank, and SelectMultiple to false.
  • The Textbox field needs to have the Default property set to the ID field (it should be a GUID) of the Combobox’s selected record, and the Update property set to its own Text property

 For esthetic purposes the Textbox fields can be hidden.

View solution in original post

thomasgarcia83
Level: Powered On

Re: Form not saving to Dynamics when using lookup fields

@Yann_SP,

 

Can you please expand more by what you describe as:

 

"

  • The Textbox field needs to have the Default property set to the ID field (it should be a GUID) of the Combobox’s selected record, and the Update property set to its own Text property"

When you state, "Update property set to its own Text Property" are you saying that the combo box card's update property must reflect the text box's content? If so , I would like to know how you got this to work, this will not recognize my text as it is incompatible text and not a record value.

Yann_SP
Level: Powered On

Re: Form not saving to Dynamics when using lookup fields

Hi @thomasgarcia83,

 

After reading again what I wrote I understand why you are confused, what I meant was:

 

Let's assume we want to add the "Supplier" lookup, you should have two Form fields, one being "Supplier" (the combobox), the other one "Supplier Value", which is a text field. So the field properties should look like that:

 

- Supplier (DataCard1):

    - Update: blank

    - Multiselect: false

 

- Supplier value (DataCard2):

   - Default: DataCardValue1.Selected.Value

   - Update: Value(DataCardValue2.Text)

 

Basically when you select an item in the combobox, you should see its GUID in the text field.

 

That's how I got it to work a few weeks ago. I've noticed these past few days that forms and fields appear to be a bit differently in terms of layout and how you can use them, so I don't know how long that will work, hopefully that will work for you.

 

 

 

thomasgarcia83
Level: Powered On

Re: Form not saving to Dynamics when using lookup fields

@Yann_SP,

 

Thanks so much for the clarification. After I thought deeply about this, I took a step back and tried to analyze what you stated before your recent reply to me and funny enough, your new post is exactly what I did. Though I am not successful, I see that you added "Value" to the DataCard2 Update property and I will try that.

 

Though I am getting an "ambigous binding present. Please resolve by sending lookup type property". 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 338 members 5,351 guests
Please welcome our newest community members: