cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous,

 

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-data-source-may-be/td-p/59251

 

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

 

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.

View solution in original post

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.

Anonymous
Not applicable

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 @Anonymous,

 

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-data-source-may-be/td-p/59251

 

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

 

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.

View solution in original post

Highlighted
Anonymous
Not applicable

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

Using Patch worked, thank you!

Anonymous
Not applicable

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':SupplierListGallery.Selected,
        'First Name': DataCardValue64.Text,
        'Address 1: State/Province':DataCardValue74.Text,
        'Last Name': DataCardValue70.Text,
        'Job Title': DataCardValue66.Text,
        Department:DataCardValue77.Text,
        Description:DataCardValue65.Text,
        'Company Name':DataCardValue68.Text,
        Website:DataCardValue78.Text,
        Email:DataCardValue35.Text,
        'Business Phone':DataCardValue71.Text,
        'Mobile Phone':DataCardValue63.Text,
        'Address 1: Street 1':DataCardValue62.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
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
Users Online
Currently online: 275 members 5,218 guests
Please welcome our newest community members: