Blog
Error - Diagnosing the error "Network error when using the Patch function" when saving data with a form
A confusing error that can occur is the error "Network error when using Patch" when attempting to save a record by calling the SubmitForm function. This post explains a possible cause of this error.
Recreating the Network error when calling Patch error
Check the data that's being saved
When records fail to save intermittently, one of the first things to check is the data that we're attempting to save.
With some trial and error, it soon becomes apparent that the length of the data contributes to the error. The record fails to save when long URLs are entered.
On investigating the properties of the field in the Dataverse table designer, it's apparent that the "maximum character count" is set to the default of 250. The app doesn't correctly enforce this 250-character limit and when the user attempts to save a record that exceeds this limit, Power Apps doesn't return a meaningful message that indicates the cause.
The interesting thing is that the failure to enforce the maximum character count applies only to the enhanced Dataverse text types, such as URL. In this example, increasing the maximum character count resolves the problem.
Conclusion
- Categories:
- dataverse
- Dataverse - How to work around the error "multiple levels of many-to-one relationship expansion aren't supported"
- Dataverse - The easiest way to modify Dataverse data outside of Dataverse and Power Apps
- Dataverse - How to use a checkbox control a set a yes/no field in Dataverse
- Dataverse - How to create Entity Relationship diagrams
- Dataverse - How you can more quickly bulk update data using the SQL language
- Dataverse - How to fix the bug in the 'Business Rules' editor that prevents numeric values from saving
- Dataverse - What are the benefits, and how to create formula columns
- Dataverse - How to sort the available choice items from a choice column
- Error - Unable to modify Dataverse tables with error message, Language id should not be null
- Dataverse - How to retrieve FetchXML or SQL for Dataverse views
- Data - Why is Dataverse so fast?
- Dataverse - How to create and use Dataverse views in Canvas Apps
- Dataverse - How to filter Dataverse choice columns
- Dataverse - How to switch to the classic designer when the option is not available
- Licensing - What are Dataverse Restricted tables?
- Media - How to save and work with microphone recordings
- Dataverse - how to access tables from another environment
- Dataverse - How to Patch the 5 most complex data types