<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1490370245776_31231"><span>Hi to all</span></div><div id="yui_3_16_0_ym19_1_1490370245776_31231"><span><br></span></div><div id="yui_3_16_0_ym19_1_1490370245776_31231" dir="ltr"><span id="yui_3_16_0_ym19_1_1490370245776_31281">excuse me, who is has a delivery solution on vtiger 5.4.</span></div><div id="yui_3_16_0_ym19_1_1490370245776_31231" dir="ltr"><span><br></span></div><div id="yui_3_16_0_ym19_1_1490370245776_31231" dir="ltr"><span>Regards</span></div><div></div><div id="yui_3_16_0_ym19_1_1490370245776_31230"> </div><div class="signature" id="yui_3_16_0_ym19_1_1490370245776_31215"><div id="yui_3_16_0_ym19_1_1490370245776_31229"><br><font style="background-color:rgb(255, 223, 191);">   </font><em><strong><font style="background-color:rgb(0, 0, 255);"><font style="background-color:rgb(255, 223, 191);">William A. Cardona</font></font><font style="background-color:rgb(255, 191, 223);"> </font></strong></em></div><div align="center" id="yui_3_16_0_ym19_1_1490370245776_31225"><em id="yui_3_16_0_ym19_1_1490370245776_31228"><font color="#0000bf" id="yui_3_16_0_ym19_1_1490370245776_31227"><strong id="yui_3_16_0_ym19_1_1490370245776_31226">"Todo lo Puedo en Cristo que me Fortalece"</strong></font></em></div><div id="yui_3_16_0_ym19_1_1490370245776_31216"><em><font color="#0000bf"><strong>Honduras, CentralAmerica</strong></font></em></div><div id="yui_3_16_0_ym19_1_1490370245776_31214"><em><font color="#0000bf"><strong>       504 9834 9127</strong></font></em></div><div> </div></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1490370245776_31384"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1490370245776_31388" style="display: block;">  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1490370245776_31387"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1490370245776_31386"> <div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31385"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1490370245776_31389"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Alan Lord <alanslists@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> vtigercrm-developers@lists.vtigercrm.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, March 24, 2017 10:16 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [Vtigercrm-developers] vtws_create('Emails')?<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1490370245776_31390"><br><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31391">I'm in the process (well almost finished) of doing a fairly complex job <br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31392">for a client where we are merging two separate vtiger systems into one.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31393"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31394">Mostly what I am doing is this:<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31395"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31396">* Read each module's data from the source database using SQL queries<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31397">* Iterate over each row and compare relevant information with the target <br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31398">system to see if we need to create a new record or merge the data into <br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31399">an existing one<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31400">* use vtws_{create/revise} as needed<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31401">* store a table of old to new crmids<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31402"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31403">If you start with the right modules this seems to be working well.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1490370245776_31404"><br></div><div dir="ltr">I've got comments, Documents and even ModTracker data moved now too. But<br></div><div dir="ltr">now I am trying to move emails from the source to the target system, I <br></div><div dir="ltr">am getting stick because of that god-awful idlists column.<br></div><div dir="ltr"><br></div><div dir="ltr">If there are multiple entries in this row, i.e.<br></div><div dir="ltr"><br></div><div dir="ltr"><a ymailto="mailto:40@1" href="mailto:40@1">40@1</a>|<a ymailto="mailto:345@1" href="mailto:345@1">345@1</a>|<a ymailto="mailto:23456@1" href="mailto:23456@1">23456@1</a>|<br></div><div dir="ltr"><br></div><div dir="ltr">what is the format to get this into the vtws data array? If I try and <br></div><div dir="ltr">keep the same format each time it tries to create a new record I get the <br></div><div dir="ltr">very helpful exception message:<br></div><div dir="ltr"><br></div><div dir="ltr">> Exception: Permission to perform the operation is denied for id<br></div><div dir="ltr"><br></div><div dir="ltr">Here would be a typical data array which I am sending into the <br></div><div dir="ltr">vtws_create method:<br></div><div dir="ltr"><br></div><div dir="ltr">> Array<br></div><div dir="ltr">> (<br></div><div dir="ltr">>     [activitytype] => Emails<br></div><div dir="ltr">>     [date_start] => 2016-06-15<br></div><div dir="ltr">>     [time_start] => 16:00:05<br></div><div dir="ltr">>     [assigned_user_id] => 19x1<br></div><div dir="ltr">>     [from_email] => <a ymailto="mailto:roaths@tech.com" href="mailto:roaths@tech.com">roaths@tech.com</a><br></div><div dir="ltr">>     [saved_toid] => ["<a ymailto="mailto:roaths@tech.com" href="mailto:roaths@tech.com">roaths@tech.com</a>"]<br></div><div dir="ltr">>     [ccmail] => [""]<br></div><div dir="ltr">>     [bccmail] => [""]<br></div><div dir="ltr">>     [parent_id] => <a ymailto="mailto:39718@1" href="mailto:39718@1">39718@1</a>|<br></div><div dir="ltr">>     [email_flag] => SENT<br></div><div dir="ltr">>     [description] => An Potential has been assigned to you on vtigerCRM<br>Details of Potential are :<br><br>Potential No:<b>POT10</b><br>Potential Name:<b>UNI Quote Request</b><br>Amount:<b>0.00</b><br>Expected Close Date:<b></b><br>Type:<b></b><br><br><br>Description :<br><br>Thank You<br>Admin<br></div><div dir="ltr">>     [subject] => Regarding Potential Assignment<br></div><div dir="ltr">> )<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">But it is not being accepted.<br></div><div dir="ltr"><br></div><div dir="ltr">For one ID in the idlists I can probably deal with that with the <br></div><div dir="ltr">"wsidxid" format I guess, but what is the format when there is more than <br></div><div dir="ltr">one in the original email?<br></div><div dir="ltr"><br></div><div dir="ltr">TIA<br></div><div dir="ltr"><br></div><div dir="ltr">Al<br></div><div dir="ltr"><br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr"><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></div><br><br></div> </div> </div>  </div></div></body></html>