„Full cache“ oder „Partial cache“ in dem „Lookup“ Control?
Was ist der Unterschied?
Der „Full cache“ wird (vermutlich) nur einmal geladen und während des Imports nicht mehr aktualisiert.
Dieser Cache wird komplett im Arbeitsspeicher abgelegt und nicht ausgelagert – kann also bei riesigen durchsuchten Tabellen zum „out of memory“ führen.
Und genauso wichtig: der Full Cache wird immer „Case sensitive“ genutzt – ein MSCRM dagegen meist „Case Insensitive“!
Der „Partial cache“ wird aktualisiert, wenn im erstem Moment im Cache kein Treffer ist, wird erst versucht ob das Satz schon in der DB ist und wenn das so ist, wird dieser Treffer im Cache eingetragen.
Das bedeutet für die normale Integration soll/muss meist „Partial cache“ genutzt werden, wenn Tabellen durchsucht werden, die möglicherweise neue bzw. andere Sätze enthalten!
Link/s:
SSIS/Kingsway MSCRM-Lookup per ScriptComponent
Verweise:
//KingswaySoft.DynamicsCrmServices //Pfad: C:\WINDOWS\assembly\GAC_MSIL\KingswaySoft.DynamicsCrmServices\1.0.0.0__705df8e0751bcea7\KingswaySoft.DynamicsCrmServices.dll //KingswaySoft.IntegrationToolkit.DynamicsCrm //Pfad: C:\Program Files (x86)\Microsoft SQL Server\120\DTS\PipelineComponents\KingswaySoft.IntegrationToolkit.DynamicsCrm.dll
Namespaces im Code:
using KingswaySoft.DynamicsCrmServices.Soap2011.OrganizationService; using KingswaySoft.DynamicsCrmServices.Soap2011.OrganizationService.Messages; using KingswaySoft.DynamicsCrmServices.Soap2011.OrganizationService.Metadata; using KingswaySoft.DynamicsCrmServices.Soap2011.OrganizationService.Query; using KingswaySoft.IntegrationToolkit.DynamicsCrm;
Code:
public override void Input0_ProcessInputRow(Input0Buffer Row) { /* * Add your code here * * http://www.kingswaysoft.com/blog/2013/06/24/Writing-Script-Component-or-Script-Task-using-CRM-Connection-Manager */ //var connMgr = this.Connections.Dynamics365; //var conn = (CrmConnection)connMgr.AcquireConnection(null); var connMgr = this.Connections.Dynamics365; var connectionString = (string)connMgr.AcquireConnection(null); var conn = new CrmConnection(connectionString); var orgService = (IOrganizationService)conn.GetCrmService(); //Select parentcustomerid from contact where contact = '00000-0000000000-00000-00000-0000' var inputValue = Row.contactid; // input0: Field "contactid" var retrievedEntity = orgService.Retrieve("account", parmInputvalue, new ColumnSet("parentcustomerid")); var outputValue = retrievedEntity.GetAttributeValue("parentcustomerid"); Row.parentcustomerid = outputValue; // output0: new Field "parentcustomerid" } </pre