cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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

Highlighted
Helper III
Helper III

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.

Highlighted
Frequent Visitor

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.

 

 

 

Highlighted
Helper III
Helper III

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,481)