<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="it-it" xmlns="http://www.w3.org/2005/Atom">
  <title>Stefano Beretta Microsoft Dynamics CRM Blog</title>
  <link rel="alternate" type="text/html" href="http://www.sberetta.it/" />
  <link rel="self" href="http://www.sberetta.it/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-07-27T12:36:30.97975+02:00</updated>
  <author>
    <name>2009 Stefano Beretta</name>
  </author>
  <subtitle>CRM e MOSS Senior Consultant</subtitle>
  <id>http://www.sberetta.it/</id>
  <generator uri="http://www.dasblog.net" version="1.9.7174.0">DasBlog</generator>
  <entry>
    <title>Se entrano paragrafi strani nella stampa unione</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/27/SeEntranoParagrafiStraniNellaStampaUnione.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,848c8deb-ca56-4985-93f2-aff1d75872bf.aspx</id>
    <published>2010-07-27T12:10:51.35475+02:00</published>
    <updated>2010-07-27T12:36:30.97975+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Sviluppo lato server" label="CRM Sviluppo lato server" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BSviluppo%2Blato%2Bserver.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
... detestati dagli sviluppatori, ma apprezzati dai clienti perche' l'idea che il
CRM possa creare lettere, posta elettronica, offerte ed altro direttamente in word
risulta essere accattivante. 
</p>
        <p>
La cosa resiste anche se per chi usa SQL Server 2008 c'e' la possibilita' di esportare
in word i report.
</p>
        <p>
Bisogna pero' ricordarsi che la stampa unione di word ammette un solo ciclo e quindi
se ci sono delle informazioni che devono essere messe solo all'inizio e alla fine
della stampa bisogna gestirle con degli if che controllino se siamo al primo o all'ultimo
item del ciclo.
</p>
        <p>
A volte pero' si sperimenta un altro grosso problema dovuto a un baco nel CRM o meglio
nel modello di word usato dal CRM: <b>CRMTemplate.dot</b>.<br />
Se ci si trova con un modello di stampa unione perfetto e poi, lanciandolo, si notano
degli "a capo" che non dovrebbero esserci la co,lpa non e' nel vostro modello, ma
nel CRM.<br />
Infatti esso per inserire i dati in word usa una macro. Essa oltre a fare cio' inserisce
qualche riga all'inizio del documento per spiegare all'utente come procedere, poi
la macro che lo stesso fa partire cliccando sul pulsante "CRM", leva queste scritte.
Peccato che essa si dimentichi un "a capo" e questo, essendo fuori dai campi della
stampa unione di word, venga ripetuto per ogni item del ciclo!!! 
<br />
Dopo diverse decine di prove sono giunto alla conclusione che l'unico modo di risolvere
il problema e' quello di modificare il codice della macro (attenzione quindi alle
rollup) e quindi modificare il file.dot aggiungendo<br /><b>ActiveDocument.Paragraphs(1).Range.Delete</b><br />
al codice della macro dopo la riga 53.
</p>
        <p>
A questo punto gira tutto.<br /></p>
        <p>
Il file si trova nel sito del CRM/_static/tools/mailmerge
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=848c8deb-ca56-4985-93f2-aff1d75872bf" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Il nuovo SDK</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/26/IlNuovoSDK.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,f9f79320-27d3-400e-bdbb-97b877960c54.aspx</id>
    <published>2010-07-26T15:03:29.089125+02:00</published>
    <updated>2010-07-26T15:07:35.182875+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Sviluppo lato server" label="CRM Sviluppo lato server" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BSviluppo%2Blato%2Bserver.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...di cui la piu' importante e' la creazione di un entity framework per il CRM e un
rpovider LinkQ to CRM
</p>
        <p>
Queste novita' rendono molto piu' compatto il codice e allineano la programmazione
del CRM (in realta' XRM come gli spazi dei nomi dei vari assembly) a quella dei nuovi
prodotti Microsoft che nel nome hanno, per intenderci, "2010" (una su tutte Share
Point 2010).<br /></p>
        <p>
Un caldo invito dunque ad utilizzare massicciamente queste novita' nei progetti consci
che questo sara' il modo standard di programmazione della prossima versione del prodotto.
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=f9f79320-27d3-400e-bdbb-97b877960c54" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Attenzione al ForceSubmit!!!</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/12/AttenzioneAlForceSubmit.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,85eb2d91-03c1-4258-993b-3bdd517b484b.aspx</id>
    <published>2010-07-12T18:12:09.78725+02:00</published>
    <updated>2010-07-12T18:15:07.896625+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="Crm Sviluppo lato client" label="Crm Sviluppo lato client" scheme="http://www.sberetta.it/CategoryView,category,Crm%2BSviluppo%2Blato%2Bclient.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...a volte puo' provocare disastri.
</p>
        <p>
Quando la si usa bisogna avere in mente quello che essa fa: forza la platform del
CRM a salvare il record corrente passando nel post del form http il valore del campo.
</p>
        <p>
          <br />
Se pero', ad esempio, il record e' in uno stato di disattivazione, cio' manda in errore
la platform perche' l'oggetto non poteva essere aggiornato.
</p>
        <p>
Quindi quando si setta questa proprieta' a true bisogna anche verificare lo stato
del record!!!
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=85eb2d91-03c1-4258-993b-3bdd517b484b" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Se dopo l'installazione della rollup 11 i menu' custom in Outlook non funzionano???</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/11/SeDopoLinstallazioneDellaRollup11IMenuCustomInOutlookNonFunzionano.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,9f58cf91-9cd9-4c6d-b9a7-e14a1af49047.aspx</id>
    <published>2010-07-12T00:07:23.256+02:00</published>
    <updated>2010-07-12T00:11:14.959125+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Configurazione" label="CRM Configurazione" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BConfigurazione.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...bisogna aggiungere una chiave di registro nella solita chiave del CRM<br />
HKEY_CURRENT_USER\software\microsoft\MSCRMClient
</p>
        <p>
Si tratta di una chiave di tipo dword con nome <b>InitToolbarForO14</b> e valore 1.
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=9f58cf91-9cd9-4c6d-b9a7-e14a1af49047" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Torniamo sulle lookup</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/11/TorniamoSulleLookup.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,07a9d29a-ee12-4807-8225-bb8fe533fdb0.aspx</id>
    <published>2010-07-11T17:28:00.849+02:00</published>
    <updated>2010-07-11T17:33:22.97475+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="Crm Sviluppo lato client" label="Crm Sviluppo lato client" scheme="http://www.sberetta.it/CategoryView,category,Crm%2BSviluppo%2Blato%2Bclient.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...ho deciso di rimettere un vecchio psot che spiega come gestire le lookup che come
comportamento predefinito offrono la possibilita' di spaziare su piu' entita'.
</p>
        <p>
In realta' l'oggetto javascript usato dalle lookup offre la proprieta' <b>lookuptype</b> che
punta all'object type code delle entita' da visualizzare.<br /></p>
        <p>
Se allora per esempio si desidera che una lookup di tipo customer (di solito permette
di selezionare account e contatti) visualizzi solo gli account bast scrivere:<br />
crmForm.all.customerid.setAttribute("lookuptypes", "1");<br />
perche' l'object type code degli account e' appunto 1.<img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=07a9d29a-ee12-4807-8225-bb8fe533fdb0" /></p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Quando il software di nstallazioe del connettore dati di reporting service va in errore</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/07/QuandoIlSoftwareDiNstallazioeDelConnettoreDatiDiReportingServiceVaInErrore.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,a6d6d78e-f69c-4e94-b82f-4419aaba9e15.aspx</id>
    <published>2010-07-07T02:44:36.756+02:00</published>
    <updated>2010-07-07T03:10:09.1935+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Configurazione" label="CRM Configurazione" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BConfigurazione.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...probabilmente si sta lavorando su un-instanza nominale di SQL Server oppure l-url
del server dei report non e' standard.
</p>
        <p>
In questi casi bisogna editare il file XML di configurazione del programma di installazione
del componente inserendo tramite gli appositi tag il nome dell'istanza e l'url del
server dei report.
</p>
        <p>
Per fare cio' bisogna:
</p>
        <ul>
          <li>
Aprire con il blocco note il file: <strong>install-config.xml;</strong></li>
          <li>
Modificare il tag <span class="t"><font color="#000000"><strong>instancename </strong>inserendo
il nome dell'istanza;</font></span></li>
          <li>
            <span class="t">
              <font color="#000000">Inserire il tag <strong>reportserverurl </strong>specificando
l'esatto rul del server dei report (quello con reportserver tanto per essere chiari);</font>
            </span>
          </li>
          <li>
            <span class="t">
              <font color="#000000">Il file apparira' simile a<br /><span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">crmsetup</font></span><span class="m"><font color="#0000ff">&gt;</font></span><div><div class="e"><div class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="m"><font color="#0000ff">       
&lt;</font></span><span class="t"><font color="#990000">srsdataconnector</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div><div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">configdbserver</font></span><span class="m"><font color="#0000ff">/&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">autoupdateconfigdb</font></span><span class="m"><font color="#0000ff">&gt;</font></span><span class="tx"><strong>1</strong></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">autoupdateconfigdb</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">reportserverurl</font></span><span class="m"><font color="#0000ff">&gt;</font></span><span class="tx"><strong>http://nome
server/Reportserver...</strong></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">reportserverurl</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">autogroupmanagementoff</font></span><span class="m"><font color="#0000ff">&gt;</font></span><span class="tx"><strong>0</strong></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">autogroupmanagementoff</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">instancename</font></span><span class="m"><font color="#0000ff">&gt;</font></span><span class="tx"><strong>novaluxsrv</strong></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">instancename</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">configsku</font></span><span class="m"><font color="#0000ff">&gt;</font></span><span class="tx"><strong>OnPremise</strong></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">configsku</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>           <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">webstore</font></span><span class="t"><font color="#990000">enabled</font></span><span class="m"><font color="#0000ff">="</font></span><b>false</b><span class="m"><font color="#0000ff">"</font></span><span class="t"><font color="#990000"> configdb</font></span><span class="m"><font color="#0000ff">="</font></span><b>false</b><font color="#0000ff"><span class="m">"</span><span class="m"> /&gt;</span></font></div></div><div class="e"><div class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="m"><font color="#0000ff">            
&lt;</font></span><span class="t"><font color="#990000">monitoring</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div><div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>                 <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">serviceaccountname</font></span><span class="m"><font color="#0000ff">/&gt;</font></span></div></div><div class="e"><div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>                 <span class="m"><font color="#0000ff">&lt;</font></span><span class="t"><font color="#990000">serviceaccountpassword</font></span><span class="m"><font color="#0000ff">/&gt;</font></span></div></div><div><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>         <span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">monitoring</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div></div><div><span class="b"><strong><font face="Courier New" color="#ff0000"> </font></strong></span>    <span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">srsdataconnector</font></span><span class="m"><font color="#0000ff">&gt;<br /></font></span><span class="m"><font color="#0000ff">&lt;/</font></span><span class="t"><font color="#990000">crmsetup</font></span><span class="m"><font color="#0000ff">&gt;</font></span></div></div></div></div></font>
            </span>
          </li>
          <li>
            <span class="t">
              <font color="#000000">
                <div>
                  <div class="e">
                    <div>
                      <div>
                        <span class="m">Lanciare l'installazione da riga di comando specificando il percorso
e il nome del file di configurazione.<br />
Il comando lanciato sara' del tipo<br /><strong>setupsrsdataconnector /CONFIG "c:\cartella\install-config.xml"</strong></span>
                      </div>
                    </div>
                  </div>
                </div>
              </font>
            </span>
          </li>
        </ul>
        <span class="t">
          <font color="#000000">
            <p>
            </p>
            <div class="e">
              <div>
                <div>
                  <span class="m">
                    <strong>E il tutto magicamente funziona!!!</strong>
                  </span>
                </div>
              </div>
            </div>
          </font>
        </span>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=a6d6d78e-f69c-4e94-b82f-4419aaba9e15" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Se si rinomina la macchina SQL</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/07/06/SeSiRinominaLaMacchinaSQL.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,92ea942e-b8b0-41b8-8bde-abf7673f595c.aspx</id>
    <published>2010-07-07T00:15:53.881+02:00</published>
    <updated>2010-07-07T00:22:06.59975+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Configurazione" label="CRM Configurazione" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BConfigurazione.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...infatti se la macchina viene rinominata dopo l'installazione di SQL, il spoftware
di installazione non riesce a connettersi a SQL Server nel modo corretto.
</p>
        <p>
Questo perche' esso guarda un record nelle tabelle di sistema del DB master che non
viene aggiornato dall'operazione.
</p>
        <p>
Per farlo manualmente bisogna lanciare 
<br />
sp_dropserver 'vecchionome'<br />
sp_addserver 'nuovonome', 'LOCAL'<br />
ovviamente se e' l'instanza nominale bisogna inserirla nei nomi con la consueta sintassi:
'nomemacchina1nomeinstanza'.<br />
Infine bisogna riavviare SQL Server.<br /></p>
        <p>
Se invece viene rinominata la macchina server del CRM fare attenzione ad andare a
togliere il vecchio account macchina dalle security di SQL Server prima di lanciare
l'installazione del CRM.
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=92ea942e-b8b0-41b8-8bde-abf7673f595c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Si puo' fare l'arricchimento dei dati con il CRM???</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/06/11/SiPuoFareLarricchimentoDeiDatiConIlCRM.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,f07a0cc7-7dcc-43d4-8655-1ecdce2873bc.aspx</id>
    <published>2010-06-11T09:55:30.541+02:00</published>
    <updated>2010-06-11T11:49:36.634875+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Configurazione" label="CRM Configurazione" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BConfigurazione.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
L'arricchimento dei dati e' un procedimento che consiste nell'esportare i dati, modificarli
e reinportarli modificando quelli esistenti.
</p>
        <p>
Questa fuzionalita era stata annunciata ormai anni fa nel prodotto ed era presente
nelle beta della versione 4, poi era stata tolta dalla versione ufficiale
</p>
        <p>
Poi, con il procedere delle rollup, e' stata reinserita, ma non pubblicizzata. Qui
sotto viene tratteggiata la procedura:
</p>
        <p>
        </p>
        <p>
        </p>
        <li>
Esportare i dati desiderati in un foglio di excel dinamico.</li>
        <br />
        <li>
Rendere visibile attraverso il comando "Scopri" la colonna contenente i GUID (sempre
l'ultima a destra).</li>
        <br />
        <li>
Spostare la colonna con GUID in prima posizione a sinistra.</li>
        <br />
        <li>
Rinominare la colonna con il nome dell'entita'.</li>
        <br />
        <li>
Salvare il file in formato ".csv".</li>
        <br />
        <li>
Meglio trasformare i ";" creati da excel con "," per un formato piu' compatibile con
il CRM</li>
        <br />
        <li>
Eseguire l'importazione con lo strumento integrato nel CRM (dovrebbe proporre il mapping
automatico)</li>
        <br />
        <li>
Nel wizard di importaziouare, in alto, compare un flag che chiede se si desidera effettuare
l'arricchimento: selezionario e premere "OK"</li>
        <br />
        <p>
BUON LAVORO!!!
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=f07a0cc7-7dcc-43d4-8655-1ecdce2873bc" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Gestire i pulsanti delle griglie dal form dell'entita' madre</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/04/25/GestireIPulsantiDelleGriglieDalFormDellentitaMadre.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,1d855994-18c9-4fe4-a08a-716597fb63e8.aspx</id>
    <published>2010-04-25T23:21:57.142625+02:00</published>
    <updated>2010-04-25T23:29:39.252+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="Crm Sviluppo lato client" label="Crm Sviluppo lato client" scheme="http://www.sberetta.it/CategoryView,category,Crm%2BSviluppo%2Blato%2Bclient.aspx" />
    <content type="html">&lt;p&gt;
...javascript per risolvere il problema.
&lt;/p&gt;
&lt;p&gt;
Queste funzioni prima nascondono alcuni pulsanti e poi ne rinominano altri. Il tutto
tramite array di nomi e di titoli passati come parametri&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
function HideAssociatedViewButtons(loadAreaId, buttonTitles, buttonTitles2, buttonTitles3,
buttonTitles4) { //Area del pulsante di sinistra, titoli da nascondere, vecchi titoli
da rinominare, nuovi nomi, vecchi nomi&lt;br /&gt;
var navElement = document.getElementById('nav_' + loadAreaId);&lt;br /&gt;
if (navElement != null) {&lt;br /&gt;
navElement.onclick = function LoadAreaOverride() {&lt;br /&gt;
loadArea(loadAreaId);&lt;br /&gt;
HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles, buttonTitles2,
buttonTitles3, buttonTitles4);&lt;br /&gt;
(document.getElementById(loadAreaId + 'Frame'), buttonTitles2, buttonTitles3);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function RenameViewButtons(iFrame, buttonTitles, newbuttonTitles, oldbuttonsnames)
{&lt;br /&gt;
var liElements = iFrame.document.getElementsByTagName('li');&lt;br /&gt;
&lt;br /&gt;&lt; buttonTitles.length; j++) {&lt;br /&gt;&lt; liElements.length; i++) {&lt;br /&gt;
for (var j = 0; j for (var i = 0; i if (liElements[i].getAttribute('title') == buttonTitles[j])
{&lt;br /&gt;
liElements[i].innerHTML = liElements[i].innerHTML.replace(oldbuttonsnames[j], newbuttonTitles[j]);&lt;br /&gt;
liElements[i].innerHTML = liElements[i].innerHTML.replace(oldbuttonsnames[j], newbuttonTitles[j]);&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function HideViewButtons(Iframe, buttonTitles, buttons2, buttons3, buttons4) {&lt;br /&gt;
if (Iframe != null) {&lt;br /&gt;
Iframe.onreadystatechange = function HideTitledButtons() {&lt;br /&gt;
var iFrame;&lt;br /&gt;
if (Iframe.readyState == 'complete') {&lt;br /&gt;
iFrame = frames[window.event.srcElement.id];&lt;br /&gt;
var liElements = iFrame.document.getElementsByTagName('li');&lt;br /&gt;
&lt;br /&gt;&lt; buttonTitles.length; j++) {&lt;br /&gt;&lt; liElements.length; i++) {&lt;br /&gt;
for (var j = 0; j for (var i = 0; i if (liElements[i].getAttribute('title') == buttonTitles[j])
{&lt;br /&gt;
liElements[i].style.display = 'none';&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
RenameViewButtons(iFrame, buttons2, buttons3, buttons4);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
} 
&lt;br /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=1d855994-18c9-4fe4-a08a-716597fb63e8" /&gt;</content>
  </entry>
  <entry>
    <title>Attenzione alla rollup 8!!!</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/04/09/AttenzioneAllaRollup8.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,d805efb5-dff3-4f27-ba8a-d95e07dea08f.aspx</id>
    <published>2010-04-09T16:17:43.55675+02:00</published>
    <updated>2010-04-09T16:25:37.384875+02:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Configurazione" label="CRM Configurazione" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BConfigurazione.aspx" />
    <content type="html">&lt;p&gt;
...si effettuano assegnazioni delle entita', anche se si hanno i pieni diritti amministrativi.
&lt;/p&gt;
&lt;p&gt;
Per risolvere il problema bisogna lanciare il seguente script SQL sui DB delle tenancy
in cui si riscontra l'errore (ovviamente dopo aver fatto un backup di tali DB):&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
SET ANSI_NULLS ON&lt;br /&gt;
GO&lt;br /&gt;
SET QUOTED_IDENTIFIER ON&lt;br /&gt;
GO&lt;br /&gt;
CREATE function [dbo].[fn_CollectForCascadeAssign]&lt;br /&gt;
(&lt;br /&gt;
@root_id uniqueidentifier,&lt;br /&gt;
@root_otc int,&lt;br /&gt;
@isoffline int,&lt;br /&gt;
@old_owner uniqueidentifier&lt;br /&gt;
)&lt;br /&gt;
returns @t table&lt;br /&gt;
( 
&lt;br /&gt;
o uniqueidentifier,&lt;br /&gt;
t int,&lt;br /&gt;
p int default 0,&lt;br /&gt;
u uniqueidentifier,&lt;br /&gt;
q uniqueidentifier,&lt;br /&gt;
s int,&lt;br /&gt;
y bit default 0&lt;br /&gt;
) 
&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
insert into @t values(@root_id,@root_otc,0,@old_owner,N'00000000-0000-0000-0000-000000000000',0,0)&lt;br /&gt;
if(exists(select * from @t where t=9100))begin insert into @t(o,t,p,u,q,s,y) select
o.ReportId,9100,0,o.OwningUser,c.o,c.t,1 from Report o,@t c where o.ParentReportId=c.o
and c.t=9100 and o.DeletionStateCode=0&lt;br /&gt;&lt;&gt; 0)if(exists(select * from @t where t=9100))insert into @t(o,t,p,u,q,s,y) select o.ReportId,9100,0,o.OwningUser,c.o,c.t,1 from Report o,@t c where o.ParentReportId=c.o and c.t=9100 and o.DeletionStateCode=0 and o.ReportId not in(select o from @t where o=o.ReportId and t=9100) end&lt;br /&gt;
while(@@rowcount if(exists(select * from @t where t in(4406,4400)))begin insert into
@t(o,t,p,u,q,s,y) select o.ActivityId,4401,0,o.OwningUser,c.o,c.t,1 from CampaignResponse
o,@t c where o.RegardingObjectId=c.o and c.t in(4406,4400) and o.DeletionStateCode=0
end&lt;br /&gt;
if(exists(select * from @t where t=4400))begin insert into @t(o,t,p,u,q,s,y) select
o.ActivityId,4402,0,o.OwningUser,c.o,c.t,1 from CampaignActivity o,@t c where o.RegardingObjectId=c.o
and c.t=4400 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.AccountId,1,0,o.OwningUser,c.o,c.t,1
from Account o,@t c where o.ParentAccountId=c.o and c.t=1 and o.DeletionStateCode=0&lt;br /&gt;&lt;&gt; 0)if(exists(select * from @t where t=1))insert into @t(o,t,p,u,q,s,y) select o.AccountId,1,0,o.OwningUser,c.o,c.t,1 from Account o,@t c where o.ParentAccountId=c.o and c.t=1 and o.DeletionStateCode=0 and o.AccountId not in(select o from @t where o=o.AccountId and t=1) end&lt;br /&gt;
while(@@rowcount if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y)
select o.ContactId,2,0,o.OwningUser,c.o,c.t,1 from Contact o,@t c where o.AccountId=c.o
and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.ContactId,2,0,o.OwningUser,c.o,c.t,1
from Contact o,@t c where o.ParentContactId=c.o and c.t=2 and o.DeletionStateCode=0&lt;br /&gt;&lt;&gt; 0)if(exists(select * from @t where t=2))insert into @t(o,t,p,u,q,s,y) select o.ContactId,2,0,o.OwningUser,c.o,c.t,1 from Contact o,@t c where o.ParentContactId=c.o and c.t=2 and o.DeletionStateCode=0 and o.ContactId not in(select o from @t where o=o.ContactId and t=2) end&lt;br /&gt;
while(@@rowcount if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y)
select o.InvoiceId,1090,0,o.OwningUser,c.o,c.t,1 from Invoice o,@t c where o.AccountId=c.o
and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.InvoiceId,1090,0,o.OwningUser,c.o,c.t,1
from Invoice o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.SalesOrderId,1088,0,o.OwningUser,c.o,c.t,1
from SalesOrder o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.SalesOrderId,1088,0,o.OwningUser,c.o,c.t,1
from SalesOrder o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1088))begin insert into @t(o,t,p,u,q,s,y) select
o.ActivityId,4209,0,o.OwningUser,c.o,c.t,1 from OrderClose o,@t c where o.SalesOrderId=c.o
and c.t=1088 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.QuoteId,1084,0,o.OwningUser,c.o,c.t,1
from Quote o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.QuoteId,1084,0,o.OwningUser,c.o,c.t,1
from Quote o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1084))begin insert into @t(o,t,p,u,q,s,y) select
o.ActivityId,4211,0,o.OwningUser,c.o,c.t,1 from QuoteClose o,@t c where o.QuoteId=c.o
and c.t=1084 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.ContractId,1010,0,o.OwningUser,c.o,c.t,1
from Contract o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.ContractId,1010,0,o.OwningUser,c.o,c.t,1
from Contract o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.IncidentId,112,0,o.OwningUser,c.o,c.t,1
from Incident o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.IncidentId,112,0,o.OwningUser,c.o,c.t,1
from Incident o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=112))begin insert into @t(o,t,p,u,q,s,y) select
o.ActivityId,4206,0,o.OwningUser,c.o,c.t,1 from IncidentResolution o,@t c where o.IncidentId=c.o
and c.t=112 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.LeadId,4,0,o.OwningUser,c.o,c.t,1
from Lead o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.LeadId,4,0,o.OwningUser,c.o,c.t,1
from Lead o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.OpportunityId,3,0,o.OwningUser,c.o,c.t,1
from Opportunity o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0
end&lt;br /&gt;
if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.OpportunityId,3,0,o.OwningUser,c.o,c.t,1
from Opportunity o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0
end&lt;br /&gt;
if(exists(select * from @t where t=3))begin insert into @t(o,t,p,u,q,s,y) select o.CustomerOpportunityRoleId,4503,0,o.OwningUser,c.o,c.t,1
from CustomerOpportunityRole o,@t c where o.OpportunityId=c.o and c.t=3 and o.DeletionStateCode=0
end&lt;br /&gt;
if(exists(select * from @t where t in(1084,1010,1090,2,3,10001,10002,1088,4,1,112)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4214,0,o.OwningUser,c.o,c.t,1 from
ServiceAppointment o,@t c where o.RegardingObjectId=c.o and c.t in(1084,1010,1090,2,3,10001,10002,1088,4,1,112)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(4400,2,4,10001,1,10002,112,1090,1010,3,1084,1088)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4212,0,o.OwningUser,c.o,c.t,1 from
Task o,@t c where o.RegardingObjectId=c.o and c.t in(4400,2,4,10001,1,10002,112,1090,1010,3,1084,1088)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(1,1090,1084,2,10002,3,1088,4,10001,1010,112,4402,4406)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4210,0,o.OwningUser,c.o,c.t,1 from
PhoneCall o,@t c where o.RegardingObjectId=c.o and c.t in(1,1090,1084,2,10002,3,1088,4,10001,1010,112,4402,4406)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t=3))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4208,0,o.OwningUser,c.o,c.t,1
from OpportunityClose o,@t c where o.OpportunityId=c.o and c.t=3 and o.DeletionStateCode=0
end&lt;br /&gt;
if(exists(select * from @t where t in(1088,1010,10001,4406,4402,112,4,1,10002,1084,1090,2,3)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4207,0,o.OwningUser,c.o,c.t,1 from
Letter o,@t c where o.RegardingObjectId=c.o and c.t in(1088,1010,10001,4406,4402,112,4,1,10002,1084,1090,2,3)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(4402,3,4,1088,112,1,10001,1010,4406,1084,10002,1090,2)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4204,0,o.OwningUser,c.o,c.t,1 from
Fax o,@t c where o.RegardingObjectId=c.o and c.t in(4402,3,4,1088,112,1,10001,1010,4406,1084,10002,1090,2)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(4700,4402,112,1,10001,4,10002,2,1090,1010,1084,4406,1088,3)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4202,0,o.OwningUser,c.o,c.t,1 from
Email o,@t c where o.RegardingObjectId=c.o and c.t in(4700,4402,112,1,10001,4,10002,2,1090,1010,1084,4406,1088,3)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(4402,112,1,3,2,1010,1088,10002,1090,4406,4,10001,1084)))begin
insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4201,0,o.OwningUser,c.o,c.t,1 from
Appointment o,@t c where o.RegardingObjectId=c.o and c.t in(4402,112,1,3,2,1010,1088,10002,1090,4406,4,10001,1084)
and o.DeletionStateCode=0 end&lt;br /&gt;
if(exists(select * from @t where t in(10002,4209,4210,4201,1088,1010,4202,4703,4,4206,4402,1084,1,4211,4414,4300,4401,4204,112,4207,3,1090,10001,4208,4214,4400,2,4212)))begin
insert into @t(o,t,p,u,q,s,y) select o.AnnotationId,5,0,o.OwningUser,c.o,c.t,1 from
Annotation o,@t c where o.ObjectId=c.o and c.t in(10002,4209,4210,4201,1088,1010,4202,4703,4,4206,4402,1084,1,4211,4414,4300,4401,4204,112,4207,3,1090,10001,4208,4214,4400,2,4212)
and o.DeletionStateCode=0 end&lt;br /&gt;
return&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Creazione SP 
&lt;br /&gt;
&lt;br /&gt;
GO&lt;br /&gt;
--/****** Object: StoredProcedure [dbo].[p_CascadeCollectAssign] Script Date: 01/29/2010
08:42:48 ******/&lt;br /&gt;
SET ANSI_NULLS ON&lt;br /&gt;
GO&lt;br /&gt;
SET QUOTED_IDENTIFIER ON&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create proc [dbo].[p_CascadeCollectAssign]&lt;br /&gt;
(&lt;br /&gt;
@operation_type nvarchar(40),&lt;br /&gt;
@root_entity_otc int,&lt;br /&gt;
@root_entity_oid uniqueidentifier,&lt;br /&gt;
@isOffline int,&lt;br /&gt;
@old_owner uniqueidentifier&lt;br /&gt;
)&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
set nocount on&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
insert into #CascadeCollectAssign select o, t, p, q, s, y&lt;br /&gt;
from dbo.fn_CollectForCascadeAssign&lt;br /&gt;
(@root_entity_oid&lt;br /&gt;
,@root_entity_otc&lt;br /&gt;
,@isOffline&lt;br /&gt;
,@old_owner&lt;br /&gt;
)&lt;br /&gt;
update #CascadeCollectAssign set processed = 2&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=d805efb5-dff3-4f27-ba8a-d95e07dea08f" /&gt;</content>
  </entry>
  <entry>
    <title>Si possono modificare i mapping nascosti???</title>
    <link rel="alternate" type="text/html" href="http://www.sberetta.it/2010/03/08/SiPossonoModificareIMappingNascosti.aspx" />
    <id>http://www.sberetta.it/PermaLink,guid,1767e931-8dd9-4666-ae42-1c15c1afca07.aspx</id>
    <published>2010-03-08T19:15:56.086875+01:00</published>
    <updated>2010-03-08T19:38:27.649375+01:00</updated>
    <category term="CRM" label="CRM" scheme="http://www.sberetta.it/CategoryView,category,CRM.aspx" />
    <category term="CRM Sviluppo lato server" label="CRM Sviluppo lato server" scheme="http://www.sberetta.it/CategoryView,category,CRM%2BSviluppo%2Blato%2Bserver.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
...i mapping non sono blindati, solo che, mcome spesso accade nel CRM, non e' visibile
la pagina web che li gestisce.
</p>
        <p>
Una semplice query nel DB della tenancy che si sta usando risolve il problema. Ecco
la procedura<br /></p>
        <li>
Lanciare sul DB una query del tipo "SELECT TargetEntityName, EntityId FROM dbo.EntityMapBase
WHERE SourceEntityName='schema name interessato'</li>
        <li>
Andare nella pagina: http://servercrm/nometenancy/Tools/SystemCustomization/relationships/Mappings/mappingList.aspx?mappingId=ID
ritornato dalla query</li>
        <li>
Modificare i mapping nascosti</li>
        <li>
Pubblicare le personalizzazioni</li>
        <p>
Il gioco e' fatto
</p>
        <img width="0" height="0" src="http://www.sberetta.it/aggbug.ashx?id=1767e931-8dd9-4666-ae42-1c15c1afca07" />
      </div>
    </content>
  </entry>
</feed>