Error on saving list item after changing content type

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Jens.Hetze
Posts: 22
Joined: Sat May 20, 2017

28 Mar 2019

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

User avatar
Jens.Hetze
Posts: 22
Joined: Sat May 20, 2017

28 Mar 2019

The problem could be narrowed down. It only occurs when the SharePoint column "content type" shows on SP Forms form.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

28 Mar 2019

Dear Jens,
Have you tried to open forms, delete Content Type field, add it back and re-save the form?
Cheers

User avatar
Jens.Hetze
Posts: 22
Joined: Sat May 20, 2017

03 Apr 2019

Hi Nikita,

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

Kind regards
Jens

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

03 Apr 2019

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');
}
Cheers

User avatar
Jens.Hetze
Posts: 22
Joined: Sat May 20, 2017

03 Apr 2019

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?

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

03 Apr 2019

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.
Cheers

User avatar
Jens.Hetze
Posts: 22
Joined: Sat May 20, 2017

10 Apr 2019

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

User avatar
AlexZver
Posts: 232
Joined: Mon Aug 27, 2018

11 Apr 2019

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.

benniefuT
Posts: 4
Joined: Sat Apr 20, 2019
Location: Denmark
Contact:

24 Apr 2019

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

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests