1

In Office 365 environment, I have received the below error while submitting the form which was developed by Sandboxed Solution.

Web Part Error : Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.

Code:

SPList List = SPContext.Current.Web.Lists["List Name"]; 
SPListItem Listitem = List.Items.Add(); 
Listitem["Title"] = "First"; 
Listitem["Status"] = "Submit"; 
Listitem.Update(); 
List.Update();

Advise me to overcome this issue.

  • Can you share code? – Asad Refai Apr 20 '16 at 8:54
  • SPList List = SPContext.Current.Web.Lists["List Name"]; SPListItem Listitem = List.Items.Add(); Listitem["Title"] = "First"; Listitem["Status"] = "Submit"; Listitem.Update(); List.Update(); – chiris Apr 21 '16 at 7:06
  • Asad, i have shared the code above. Thanks in advance if u have any solution... – chiris Apr 21 '16 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.