2

I have an ListAdded event handler in which I'm associating OOB Approval workflow if any list is created based on my custom list definition.

As soon as the list is created, SharePoint throws this error:

Sorry, something went wrong The specified program requires a new version of Windows. (Exception from HRESULT:0x8007047E)

But when I go and see, the list is created successfully and workflow is associated just fine!

The exact same code works just fine, if i add it as a feature receiver

Any help would be appreciated.

Thanks Sanjay

2
  • In further investigation, it turned out that this is working fine for OOB document libraries and one of my custom list definition. So I'm getting this error on only lists created based on ONE custom list definition. – Sanjay Bhagia Oct 25 '13 at 14:42
  • Well, it turned out that in my custom list definition's schema.xml file I set "ModeratedList=True" to enable content approval on the list. That somehow caused the problem. So, I removed that attribute, set content approval through my code in my ListAdded event receiver and redeployed the solution and everything worked!. – Sanjay Bhagia Oct 29 '13 at 15:06

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.