Benutzer mit den meisten Antworten
CRM 4 - BLOB Storage

Frage
-
Hallo,
ist es möglich, in CRM4 Dateianhänge wie PDF Dokumente, JPEG-Bilder usw. aus der Datenbank zu extrahieren und auf einen extra Speicher zu legen?
Problem ist das wir an alle Vorgänge Anhänge speichern und die Datenbank natürlich aufgebläht wird.
Habt ihr eine Idee?VG
Olli
Antworten
-
Hallo Olli,
das ist im CRM nicht vorgesehen. Auch wird das manuelle Ändern der Datenbank und Auslagern eines Teils der Daten nicht unterstützt und ist nicht supportet.
Ihr könnt natürlich Dokumente z.B. auf einem SharePoint Server ablegen, damit diese dann in der SharePoint Datenbank gespeichert werden.
Viele Grüße
Michael Sulz
MVP für Microsoft Dynamics CRM- Als Antwort markiert Michael Sulz Mittwoch, 4. August 2010 13:10
Alle Antworten
-
Hallo Olli,
das ist im CRM nicht vorgesehen. Auch wird das manuelle Ändern der Datenbank und Auslagern eines Teils der Daten nicht unterstützt und ist nicht supportet.
Ihr könnt natürlich Dokumente z.B. auf einem SharePoint Server ablegen, damit diese dann in der SharePoint Datenbank gespeichert werden.
Viele Grüße
Michael Sulz
MVP für Microsoft Dynamics CRM- Als Antwort markiert Michael Sulz Mittwoch, 4. August 2010 13:10
-
Das Extrahieren von Attachments wäre per Plug-in mögliche (also auch supported). Die Daten dann in ein externes Storage zu verlagern und innerhalb des CRM eine neue Verlinkung zu schaffen wäre ebenso über eine Plug-In Programmierung möglich.
the below code will reterieve all the annotation(notes)
CrmService service = new CrmService();
service.Url = ""http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Create a column set holding the names of the columns to be retrieved.
ColumnSet cols = new ColumnSet();
cols.Attributes = new string [] {"notetext", "documentbody"};
// Create the query object.
QueryByAttribute query = new QueryByAttribute();
query.ColumnSet = cols;
query.EntityName = EntityName.annotation.ToString();
// Execute the retrieval.
BusinessEntityCollection retrieved = service.RetrieveMultiple(query);and the following code will save the annotation file to some folder
Guid annotationId = setupAnnotationId;
// Define the columns to retrieve from the annotation record.
ColumnSet cols1 = new ColumnSet();
cols1.Attributes = new string[] { "filename", "documentbody" };
// Retrieve the annotation record.
annotation annotationAttachment = (annotation)service.Retrieve(EntityName.annotation.ToString(), annotationId, cols1);
// Download the attachment in the current execution folder.
using (FileStream fileStream = new FileStream(annotationAttachment.filename, FileMode.OpenOrCreate))
{
byte[] fileContent = new UTF8Encoding(true).GetBytes(annotationAttachment.documentbody);
fileStream.Write(fileContent, 0, fileContent.Length);see this thread for more details.
Gruß Carsten Groth http://carstengroth.spaces.live.com