This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

This occurs when creating a new form and setting the App to use the new form as "New" form. An incorrect URL is generated when trying to create a new SharePoint list item. A 404 error appears on the page. 

The URL seems to be missing the Host Name of the URL (ex. https://K2.denallix.com)

Symptoms

A 404 error appears when clicking New Item in SharePoint. The same issue occurs with the Display and Edit forms in K2 Smartforms.

Troubleshooting Steps

Complete the following steps: 
  • Check the URL that it redirects to. Make sure this has a full URL for the TargetURL parameter.
    • https://portal.denallix.com/K2Pages/NewForm.aspx?targetUrl=https%3a%2f%2fk2.denallix.com
      %2fRuntime%2fRuntime%2fForm%2fNewportal__denallix__com__Lists__TestItemForm%3fUIV%3d15&List
      =76d4c49b%2Df806%2D44c2%2D82e5%2D5a66d5a722fd&Source=https%3A%2F%2Fportal%2Edenallix%2Ecom
      %2FLists%2FTest%2FAllItems%2Easpx&RootFolder=&Web=eaff9988%2Dcdce%2D4ef0%2Da213%2D7164da951d51

    • Notice how the above URL has a Host name in the Target URL, this is correct. If you only have Form/[FormName] then you will need to check the K2 Settings List.
  • Also check the Integration.ProcessSharePointSetting table in the Database to see what the Target URL for the form looks like. 
  • Check the hidden K2 Setting List ([SharepointURL]/lists/K2 Settings). Make sure that the Smartforms Runtime URL is set to the correct Environment Field.
    • If this was incorrect, simply set it to the correct environment field/URL and re-activate the site. This will bring in the correct New Item Form.