SharePointDocumentLocations and SharePointSiteCollections #1025
Unanswered
aaronhamilton
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Two questions:
I have Document Locations in CRM which have lost their association to SharePointSites. Is there an XRM function I could use to re-associate? I see a method called Add-CrmRecordAssociation..... could this work? I will be attempting this next.
Is there a way to programmatically 'Validate' my SharePointSite records? I have tried setting a few validation fields, but it was insufficient to properly validate (ie did no fix errors on CRM's 'Files' tab).
BACKGROUND
After importing millions of client records into D365 and using XRM functions to create SharePoint Document Locations, we have encountered a problem......
Along with the document locations, there were corresponding SharePointSite records created, but they were flagged as "Not Validated" and therefore we were unable to navigate to SharePoint from D365's Files tab. When I manually clicked the 'Validate' button in SharePointSites entity, when we could click Files tab and see the documents in SharePoint.
So... I tried to write a PS script to set all SharePointSite records to 'Validated'... but it turned out to be insufficient to fix the Files tab, so I ran my script again to switch the IsValidated back to False. Somehow, my actions disassociated my SharePointSite record from all the corresponding Document Locations! Every document location associated with those SharePointSite records lost its sitecollectionid field. This has affected 113,000 document locations.
How to fix this situation? I see two options:
Beta Was this translation helpful? Give feedback.
All reactions