Forum Discussion
Field or property "Audit" does not exist
I am using SharePointPnPCore2013 Nuget Package to create a template xml using the method explained at the video below.
https://channel9.msdn.com/blogs/OfficeDevPnP/Getting-Started-with-PnP-Provisioning-Engine
However, i get an error "Field or property "Audit" does not exist" at GetProvisioningTemplate method. Can you please suggest me a way to get rid of this error?
- Deleted
Hi Prasad,
It seems the custom column does not yet exist. But just a questoin did you first get a export of a site or did you start from scratch? and are you provisioning a subsite or a site. Do you use content types?
so a bit more info would be helpfull.
- DeletedHi Paul. Thank you for getting back to me. Answers below. 1. I get an error while exporting the site 2. It is a POC. So I have created a site collection using OOB Team site as template and trying to save the site as xml using the PnP Provisioning Engine. 3. I am trying to provision a site collection. 4. There are no additional content types added. Site has only those elements created as part of the site creation 5. I use a multi tenant environment. Does that have an impact? 6. I did try the same steps on an Office 365 site (using corresponding nuget package), it worked fine without any error. I face this issue only on SharePoint On Premise. Happy to provide any additional information.
- DeletedHi Prasad, so code is running fine on Office365? did you change the library to On premm with PNP? VesaJuvonen any idea?
- VesaJuvonenMicrosoft
This seems to be due the fact that some of the CSOM properties are not available in on-premises, which are available in SharePoint Online. This particular code sample is built towards SP Online, so it is using Online CSOM by default. If you do not update the PnP Core Nuget package to matching on-premises version (2013 or 2016), you will see this kind of issues.
So - how to fix it? - Update the PnP Core Nuget package reference to be for on-premises. Here's a blog post, which explains the CSOM version challenge in practice and which version should be used where - https://dev.office.com/blogs/using-correct-csom-version-for-sharepoint-customizations.
- DeletedHi Paul Thank you for your inputs. I was able to get rid of this error by installing June 2016 CU on my SharePoint on premise environment. It works fine now and TemplateXML gets created successfully. However, I get some errors while applying template xml created for a Publishing site. Is there a way to skip the errors and proceed with rest of the steps while applying template?
- DeletedThank you VesaJuvonen I am using the Nuget Package for SharePoint On Premise named "SharePointPnPCore2013" . I installed June 2016 CU and that seems to have helped. It is working fine now.
- Malathi SekkappanMicrosoft
I are using SharePointPnPCore2013 2.11.1701.1 and I am still having issues. Are there any other updates?
- VesaJuvonenMicrosoft
There's two factors for this.
- Right PowerShell/Nuget package - you'll need to use the specific version, like SP2013 version for SP2013
- Rigth SP2013 version being installed on the server side. Our baseline is April 2015 CU - If you are using older version of the SP2013 installation, you might run into issues