Scenario:As per my requirement I need to create a projectrequest form with NEW/Edit/Display. when I click on the add new item ,the new custom input form which is created using the SP DESIGNER 2013 - say projectrequestnewform, should be populated.

Hence, I have created a custom new form using SP Designer 2013 with custom html controls, and other JSOM code for inserting into the splist,validation using jQuery, other js files. Below steps been used to populate the projectrequestnewform form.

  1. Copied the projectrequestnewform into siteasets library of my publishing site collection
  2. Similarly, copied projectrequesteditform && projectrequestdispform into siteasets library
  3. Clicked on the new item from the splist and edit the page and added a content editor web part to give a link to this projectrequestnewform location: /siteassets/projectrequestnewform.html
  4. Also the siteassets library contains the projectrequestnewform.js file that has the JSOM code for CRUD operations on this splist.

when the input form projectrequestnewform.html is loaded on the page, it will be filled with many controls like peoplepicker and dropdowns populated from a SPGroup, Textboxes for entry and having submit,save and cancel functionalities.

when the form's save button is clicked it will simply insert the item into the splist and when submit button is clicked it will finally trigger some approval workflow thats created by SP Wokrflow 2013 Template. This was configured by using SP Designer 2013+ Workflow Manager.

Problem: As part of my reuirement, I also need to apply itemlevelpermissions when this item is inserted/updated. As per my below code,when I applied the itemlevelpermissions feature, permissions got applied to projectrequestnewform.html thats residing in the siteassets library instead of the new item got created in the projectrequest splist.

Also when my event receiver is triggered, I am getting the access denied error such that, i wont be able to add an item into this list.


  1. I am stuck with how an item added eventreceiver thats targetted to apply the new item in the splist got deviated/applied to the permissions of the the projectrequestnewform.html ?
  2. Does the workflow thats been configured on this SPList's when an item is added , influencing the itemadded() eventhandler ?
  3. can a splistitem would be able to handle both itemadded() eventhandler/receivers and a SP D worflow ?
  4. or my approach of triggering both itemadded/itemupdated() eventreceiver() for applying permissions on the item and trigger an workflow/approval process with multiple tasks simultaneously is NOT ALLOWED as per SharePoint Design ?

Has anyone faced this issue before?


 public override void ItemUpdated(SPItemEventProperties properties)

        SPUser currUser = properties.Web.CurrentUser;

        this.EventFiringEnabled = false;


            // if (properties.ListTitle.ToLower() == NPDListNames.ITEMLEVELPERMISSIONSLIST.ToString())
            // {


                SPSite CurrentSite = new SPSite(properties.SiteId);
                SPWeb CurrentWeb = CurrentSite.OpenWeb(properties.RelativeWebUrl);

                SPList CurrentList = CurrentWeb.Lists[properties.ListId];

                SPListItem CurrentListItem;
                CurrentListItem = 

  if (!CurrentListItem.HasUniqueRoleAssignments)
                    CurrentWeb.AllowUnsafeUpdates = true;

                    SPRoleAssignmentCollection SPRoleAssColn = CurrentListItem.RoleAssignments;
                    for (int i = SPRoleAssColn.Count - 1; i >= 0; i--)
                        SPRoleAssignment roleAssignmentSingle = SPRoleAssColn[i];
                        System.Type t = roleAssignmentSingle.Member.GetType();
                        if (t.Name == "SPGroup" || t.Name == "SPUser")


  • 2
    what is your question? Jan 30, 2017 at 13:38
  • hello, i have written my question, can you pls help, why my eventreceiver is applying permissions for the customnewform.html file thats residing in the siteassets lib instead of the custom list's new item!!
    – samolpp2
    Jan 30, 2017 at 13:38
  • @SaMolPP You can refine your question. Filter out unwanted details and throw more light on problem and question.
    – Asad Refai
    Jan 31, 2017 at 8:41
  • @AsadRefai , i have updated my question with details and code. I am facing this critical issue i my current project. It would be great, If you can help /suggest the approaches ,point me in the right direction,
    – samolpp2
    Feb 4, 2017 at 15:29

2 Answers 2


please insert a wait condition for 2-3 minutes at the beginning of the designer workflow and check once, so that the code in the event receiver will complete the execution and workflow action will start the after the wait condition. try this and check once

  • the idea about adding a wait condition is seems ok, but somehow i am unable to get it work.
    – samolpp2
    Feb 12, 2017 at 1:06

It is my understanding that both the item added event and the designer workflow will both get fired, not sure though which will get fired first but they are most likely both running at the same time. What might be a better approach, is to not run the sharepoint designer workflow until the item added event has triggered. In the item added event you can then trigger the workflow through CSOM code. Not sure if that helps answer your questions or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.