locked
LightSwitch HTML Client- SharePoint: Save operation failed RRS feed

  • Question

  • I am trying to add new item to a SharePoint list through LightSwitch HTML client application (It is not a SharePoint app, just a LightSwitch HTML Application for on premises SharePoint 2013). I have an Add Edit screen for the same. When saving the new item, I get the following error:

    Save operation failed
    
        One or more of the changes failed to save. To ensure consistency, refresh and re-apply your changes.
        Inner exception message:
        An error occurred while processing this request.
        Inner exception message:
        <?xml version="1.0" encoding="utf-8" standalone="yes"?>
        <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
         <code></code>
         <message xml:lang="en-US">An error occurred while processing this request
         </message>
        </error>

    The item still gets added to the list.
    Everything works fine except this error popping up when I save the item. I have no server side code yet. No scripts even. I have added screens using Visual Studio 2013 functionality. No custom code on save method as well. Is this an error due to the model I am choosing? I have imported the tables from SharePoint (DataSource) and lists have dependencies over each other. There are lookup columns in my SharePoint lists. Where am I going wrong?


    Monday, December 23, 2013 12:25 PM

All replies

  • Hi,

    Have you tried to turn on LightSwitch diagnostics or used fiddler to grab the response from the server when your save operation fails? Either of these should provide you with detailed information on what specific properties are the source of the concurrency error. The following blog post describes how to use fiddler and to enable diagnostics if you are unfamiliar with them:
    http://blogs.msdn.com/b/lightswitch/archive/2011/09/20/diagnosing-problems-in-a-deployed-lightswitch-application-eric-erhardt.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 24, 2013 3:08 AM
    Moderator
  • Using fiddler, I got the following stack trace:


    {"odata.error":{"code":"1","message":{"lang":"en-US","value":
    "<?xml version=\"1.0\" encoding=\"utf-16\"?>
    <ExceptionInfo>

    <Message>
    One or more of the changes failed to save.  To ensure consistency, refresh and re-apply your changes.\r\nInner exception message:\r\nAn error occurred while processing this request.\r\nInner exception message:\r\n&lt;?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?&gt;\r\n&lt;error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"&gt;\r\n  &lt;code&gt;&lt;/code&gt;\r\n  &lt;message xml:lang=\"en-US\"&gt;An error occurred while processing this request.&lt;/message&gt;\r\n&lt;/error&gt;
    </Message>

    <StackTrace>   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.AstoriaDataServiceDataProvider.&lt;&gt;c__DisplayClass1.&lt;SubmitCore&gt;b__0()\r\n   at

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.AstoriaDataServiceDataProvider.InvokeAstoriaOperation(DataServiceContext context, Action astoriaOperation)\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.AstoriaDataServiceDataProvider.SubmitCore(IEnumerable`1 changes)\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.DataProvider.Submit(IEnumerable`1 changes)\r\n   at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.PerformPersistCore(IEnumerable`1 eventsChangeSetItems)\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.&lt;&gt;c__DisplayClass46.&lt;PerformPersist&gt;b__45()\r\n   at Microsoft.LightSwitch.Threading.DualDispatcherObject.Mutate(IDispatcher logicDispatcher, MutatorHost host, Action mutator)\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.PerformPersist(IEnumerable`1 eventsChangeSetItems)\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.Microsoft.LightSwitch.ServerGenerated.Implementation.IServerDataServiceImplementationCore.Submit()\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.&lt;&gt;c__DisplayClasse.&lt;Microsoft.LightSwitch.ServerGenerated.Implementation.IODataService.SaveChanges&gt;b__c()\r\n   at 

    Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.InvokeOperationCore[T](String operationName, Object[] args, Boolean invokedFromODataClient, Func`1 invokeOperation, Action catchCallback, Action`2 serializeCustomExceptionInfo)

    </StackTrace>

    <ErrorInfo />

    </ExceptionInfo>"}}}
    Tuesday, December 24, 2013 6:48 AM