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

SubmitForm doesn't work when i submit a Lookup object to CDS field

Hi everyone,

 

I have a problem with my form. I explain my porject and issue below.

 

In my app i manage the appointments from Appointment Entity in CommonDataService. I use a custom Form to add new record to the entity by using the Appointment quick create form from Dynamic365 (image below)

 

modulo quick create1.PNGmodulo quick create2.png The "Contact Name" field is a lookup filed. It has been created by the relation more to one with the Entity Contact has i've shown below

realtion.PNG

From those datasource i created my app to manage the appointments (Create, modify and view forms)

The main screen has a gallery with the Appointment Entity records.

screen1.PNG

no errors occur when I edit a record because the Contact Name field is in DisplayMode.View, but when I create a new record, i get an error from the submitForm() function

screen2.PNGI'm tring to write a lookup object (obtained from the contact table) to the Appointment Fild, and this doesn't like to the system. The error message: The requested operation is invalid. Server response: a value must be submitted for this item"

I already visit this thread

 https://powerusers.microsoft.com/t5/General-Discussion/Urgent-SubmitForm-function-is-broken-when-sub... 

but i don't understand how it can help me. 

 

Thank you.

 

MR

2 REPLIES 2
Community Support Team
Community Support Team

Re: SubmitForm doesn't work when i submit a Lookup object to CDS field

Hi @MARIOROSSIBEAN ,

 

Did you use the default auto-generated app and didn't make any changes? If not, please tell what changes that you made, and share the related formulas. Like what is the Update property of the problematic data card. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MARIOROSSIBEAN
Level: Powered On

Re: SubmitForm doesn't work when i submit a Lookup object to CDS field

Hi @v-monli-msft 

 

At first, Thank you fot the answer.

 

I show you what i did below.

I created a lookup field in the Appointment Entity in CDS bye creating a realtion m-2-1 with Contact Entity (as i'v shown below)

Cattura.PNG

Cattura1.PNG

Then in PowerApps Studio in Edit Form i did like that.

Cattura3.PNGCattura2.PNG

My goal is to submit the form (with PAtch() or SubmitForm() ?) in order to update the entity Appointment (to update the 'Contact Name' field in Appointment Entity with an Contact object which is showhing then full name).

 

I'm getting crazy!! 

 

Thank you,

 

Andi

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,850)