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

Urgent: SubmitForm function is broken when submitting to CDS

Hello,

I attended the MS Biz Apps Summit last week and on Monday, July 30th started having issues when submitting forms to add/edit records to a CDS entity. I had worked with MS developers at the Summit to get my app running perfectly, and now it is broken even though I made no changes to it. 

 

I have two separate splash screens that pop up allowing the user to add a record to either the Contacts and "Certifications & Licenses" (custom) entities. There is a many-to-one relationship between each of these entities and the selected Account record, which is chosen on another screen. Once the required data is entered for the Contact or Cert record, the user clicks the Submit button, which has OnSelect: SubmitForm(CertEditForm);UpdateContext({certformvisible:false}). Nothing fancy. 

 

This was working perfectly, but now upon submitting a red header error pops up: "There was a problem saving your changes. The data source may be invalid." This happens when submitting either form. The data source is not invalid, and I've tried deleting then re-adding the CDS entities as data sources in PowerApps.

 

One form's Submit button also has a mysterious error: "The requested operation is invalid. Server response: a value must be submitted for this item" while the other does not, even though both have OnSelect code in identical formats. I have a value set for all fields marked Required in CDS. This error does not show up in the error checker sidebar.

 

Finally, the forms do not always load. Sometimes they're inexplicably blank, and will only show up again after refreshing the page a few times.

 

I have a client presentation on Monday and need this app working again. Currently a trial user planning on purchasing several licenses for a large org but that won't happen if this key functionality is broken.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Urgent: SubmitForm function is broken when submitting to CDS

Hi @bmothershead,

 

Could you please share a bit more about your scenario?

 

I have made a test on my side and don't have the issue that you mentioned.

 

The user @UncountedBrute and @jtillinghast have faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/There-was-a-problem-saving-your-changes-The-d...

 

https://powerusers.microsoft.com/t5/General-Discussion/Form-No-Item-to-Display-Data-Source-May-Be-In...

 

Please take a try to use Patch function to save form data into your CDS entity instead of SubmitForm function, then check if the issue is solved:

Patch(
 "CDSEntityDataSource",
 Defaults(CDSEntityDataSource),
 {
   Column1:DataCardValue1.Text,
   Column2:DataCardValue2.Text,
   ...
 }
)

 

More details about the Patch function, please check the following article:

Patch function

 

If the issue still exists, please take a try to re-create the entity within your CDS, then re-create an app again to check if the issue is solved.

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Super User
Super User

Re: Urgent: SubmitForm function is broken when submitting to CDS

It looks like you have a blank required field on product services.

bmothershead
Level: Powered On

Re: Urgent: SubmitForm function is broken when submitting to CDS

I don't, I've checked multiple times

Community Support Team
Community Support Team

Re: Urgent: SubmitForm function is broken when submitting to CDS

Hi @bmothershead,

 

Could you please share a bit more about your scenario?

 

I have made a test on my side and don't have the issue that you mentioned.

 

The user @UncountedBrute and @jtillinghast have faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/There-was-a-problem-saving-your-changes-The-d...

 

https://powerusers.microsoft.com/t5/General-Discussion/Form-No-Item-to-Display-Data-Source-May-Be-In...

 

Please take a try to use Patch function to save form data into your CDS entity instead of SubmitForm function, then check if the issue is solved:

Patch(
 "CDSEntityDataSource",
 Defaults(CDSEntityDataSource),
 {
   Column1:DataCardValue1.Text,
   Column2:DataCardValue2.Text,
   ...
 }
)

 

More details about the Patch function, please check the following article:

Patch function

 

If the issue still exists, please take a try to re-create the entity within your CDS, then re-create an app again to check if the issue is solved.

 

Best regards,

Kris

 

 

 

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

Re: Urgent: SubmitForm function is broken when submitting to CDS

Using Patch worked, thank you!

bmothershead
Level: Powered On

Re: Urgent: SubmitForm function is broken when submitting to CDS

Patch was working but now I'm getting the error message: "The requested operation is invalid. Server response: Ambiguous binding is present. Resolve by sending lookup_type property." Any idea what this means or how to resolve it? Here's the expression that's in use as the OnSelect property of my submit button: 

Patch(
    Contacts,
    Defaults(Contacts),
    {
        'References For Account'Smiley FrustratedupplierListGallery.Selected,
        'First Name': DataCardValue64.Text,
        'Address 1: State/Province'Smiley Very HappyataCardValue74.Text,
        'Last Name': DataCardValue70.Text,
        'Job Title': DataCardValue66.Text,
        DepartmentSmiley Very HappyataCardValue77.Text,
        DescriptionSmiley Very HappyataCardValue65.Text,
        'Company Name'Smiley Very HappyataCardValue68.Text,
        WebsiteSmiley Very HappyataCardValue78.Text,
        EmailSmiley Very HappyataCardValue35.Text,
        'Business Phone'Smiley Very HappyataCardValue71.Text,
        'Mobile Phone'Smiley Very HappyataCardValue63.Text,
        'Address 1: Street 1'Smiley Very HappyataCardValue62.Text,
        'Address 1: City': DataCardValue51.Text,
        'Address 1: ZIP/Postal Code': DataCardValue69.Text,
        'Address 1: Street 2': DataCardValue67.Text,
        'Address 1: Country/Region': DataCardValue73.Text
    }
);
UpdateContext({refsformvisible: false})

 'References For Account' is my lookup from Contact to Account entity lookup relationship. I've used this code format in two other submit buttons (using similar fields) and it works fine. Any help is appreciated!

nishi
Level: Power Up

Re: Urgent: SubmitForm function is broken when submitting to CDS

It says Expected DataEntityRecord for Navigation Column . Please help

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Tomorrow, September 18th at 8am PDT

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 99 members 4,197 guests
Please welcome our newest community members: