CRMScript unable to work with documents stored in SharePoint

Frode Lillerud 19 Aug 2022

Hi,

what's the story with CRMScript and documents when stored in SharePoint?

We have a customization which used to work, but lately it keeps failing with errors like "No document plugin found for plugin id 365", "Object not set to an instance of an object", and "Document info is blank" when working with DocumentEntities. I'm not sure if the customization broke because they've changed the templates from SO_ARC to SharePoint, or if CRMScript used to work against SharePoint.

Here is some example code - it works fine when the document is stored in SO_ARC, but when the template is set to use SharePoint it fails with various errors.

#setLanguageLevel 3;

Integer documentId = 4486; // Document stored in SharePoint
//Integer documentId = 4488; // Document stored in SO_ARC

NSDocumentAgent agent;
NSDocumentEntity documentEntity = agent.GetDocumentEntity(documentId);

NSStream stream = agent.GetDocumentStream(documentId); // Fails with "Document info is blank"
Byte[] bytes = stream.GetStream();
printLine(bytes.length().toString());

NSStream stream2 = agent.GetDocumentStreamFromEntity(documentEntity); // Fails with "Object not set to an instance of an object"
Byte[] bytes2 = stream2.GetStream();
printLine(bytes2.length().toString());

agent.DeleteDocumentEntity(documentId); // Fails with "No document plugin found for plugin id 365"

Is there anything we can do about this?


RE: CRMScript unable to work with documents stored in SharePoint

David Hollegien 19 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Jostein Kjønigsen 22 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Frode Lillerud 22 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

David Hollegien 22 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Jostein Kjønigsen 22 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Frode Lillerud 22 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Jostein Kjønigsen 23 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Jostein Kjønigsen 31 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Frode Lillerud 31 Aug 2022

RE: CRMScript unable to work with documents stored in SharePoint

Erik Lebiko 5 Oct 2022

RE: CRMScript unable to work with documents stored in SharePoint

Frode Lillerud 5 Oct 2022

RE: CRMScript unable to work with documents stored in SharePoint

Erik Lebiko 5 Oct 2022