Page 1 of 1

Error on saving list item after changing content type

Posted: 28 Mar 2019
by Jens.Hetze
Dear SP Forms Designer Team,

there is a issue on saving list item form after changing content type on SharePoint Server 2016. This Issue occurred only with using SP Forms Designer. On default SharePoint forms saving is done.

The Error in ULS is:
"Error while executing web part: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index0
at Microsoft.SharePoint.Utilities.SPChunked2DObjectArray.get_Item(Int32 index0, Int32 index1)
at Microsoft.SharePoint.SPListItemCollection.CopyRow(SPListItemCollection srcListItems, Int32 iSrcIndex, Int32 iDestIndex)
at Microsoft.SharePoint.SPListItem.EnsureItemIsValid()
at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)
at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)
at Microsoft.SharePoint.Utilities.SPUtility.GetCheckedOutUserId(SPItem item)
at Microsoft.SharePoint.Utilities.SPUtility.IsCheckedOut(SPItem item)
at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
at System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)"

The URL is used is "http://SPSERVER/sites/gmb/dc/vm/Vertrge ... f031f29d5d"

Do I reduce the URL to "http://SPSERVER/sites/gmb/dc/vm/Vertrge ... 30&IsDlg=1", it works fine.

The error displayed in SharePoint front end is "The data source control failed to execute the update command".

Any Ideas?

Thanks in advance.
Jens

Re: Error on saving list item after changing content type

Posted: 28 Mar 2019
by Jens.Hetze
The problem could be narrowed down. It only occurs when the SharePoint column "content type" shows on SP Forms form.

Re: Error on saving list item after changing content type

Posted: 28 Mar 2019
by Nikita Kurguzov
Dear Jens,
Have you tried to open forms, delete Content Type field, add it back and re-save the form?

Re: Error on saving list item after changing content type

Posted: 03 Apr 2019
by Jens.Hetze
Hi Nikita,

I tried it. The same error is occured.
This is a new created forms.
Do you have futher ideas?

Kind regards
Jens

Re: Error on saving list item after changing content type

Posted: 03 Apr 2019
by Nikita Kurguzov
Dear Jens,
Alternatively, you can try to remove URL parameters when page opens and redirect users to page without these.

For example, you could try something like this:

Code: Select all

function removeParams(sParam){
    var url = window.location.href.split('?')[0]+'?';
    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
      sURLVariables = sPageURL.split('&'),
      sParameterName,
      i;
         
    for (i = 0; i < sURLVariables.length; i++) {
        sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] != sParam) {
            url = url + sParameterName[0] + '=' + sParameterName[1] + '&'
        }
    }
    return url.substring(0,url.length-1);
}

if(GetUrlKeyValue('RootFolder').length > 0){
    window.location = removeParams('RootFolder');
}

Re: Error on saving list item after changing content type

Posted: 03 Apr 2019
by Jens.Hetze
Dear Nikita,
I tried this. The same error is occured. On Testing with reduced url I open the form not in modal Dialog. Now it did. Could this have an Impact?

Re: Error on saving list item after changing content type

Posted: 03 Apr 2019
by Nikita Kurguzov
Dear Jens,
It could, depending on where exactly you open the form. There is definitely some issue either with URL or with the dialog (or likely both when used at the same time), please, test and see what causes it. You can try removing different parts of the URL for example, and see if it has an effect.

Re: Error on saving list item after changing content type

Posted: 10 Apr 2019
by Jens.Hetze
Hi Nikita,
now we found a solution. The problem was "lookup column threshold" in ressource management of webapplication. There was 12 columns configured but the list includes 13 lookup columns. :-(
Is it possible for your team to throw a better error-message, if threshold is to small?

Thanks for your help.

Kind regards
Jens

Re: Error on saving list item after changing content type

Posted: 11 Apr 2019
by AlexZver
Hi Jens,

It's a default message from the server, unfortunately, we can't modify it.

Thank you for the information, this knowledge will help us diagnose such cases in the future.

Error on saving list item after changing content type

Posted: 24 Apr 2019
by benniefuT
My guess would be that one of the lists doesnt have the lookup field in the default content type. Look at the list settings for that list, and ensure it has the field selected for the content type.Alexander