<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">If you look at the code in vtlib, it defaults the related list function to get_dependents_list, and inserts the field id of the related field that we just related to this module. </div><div class="gmail_default" style="font-family:verdana,sans-serif">Which is perfect, its only if you want it do something custom that we need to change the function in which case we would manually create the list function.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">It also <i>attempts </i>to get the actions (Add & Select) using the call to Vtiger_Module_Model::getRelationshipActions() which <i>should</i> return Array('ADD','SELECT') (presumably the idea being that if further actions are ever added they would get returned too!) - however this call never works. I think its becuase this function is located in /modules/Vtiger/models/Module.php which the first line of which does vimport('~/vtlib/Vtiger/Module.php') which I think upsets it when we've already included it??</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><p style="font-size:12.8px;color:rgb(80,0,80)"><span style="color:navy;font-family:Verdana,sans-serif;font-size:10pt">Martin Allen</span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b style="color:rgb(34,34,34);font-size:12.8px"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><a href="https://emailrtc.voiceflex.com/?c=7b355216c4" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(31,73,125)">>>Call me now for free<<</span></a></span></b><span style="color:navy;font-family:Verdana,sans-serif;font-size:10pt"><br></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b style="font-size:12.8px"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)">01392 248692 - Main Office<br>01392 690659 - Direct Line</span></b><br></p><p style="font-size:12.8px;color:rgb(80,0,80)"><b><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(51,51,153)"><img width="288" height="65" src="cid:image001.png@01CFC1D6.1BCFF790" alt="signature2"></span></b><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy">Have you visited our website recently? <a href="http://www.clystnet.com/" style="color:rgb(17,85,204)" target="_blank">http://www.clystnet.com</a></span><span style="color:rgb(31,73,125)"></span></p><p style="font-size:12.8px;color:rgb(80,0,80)"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:navy"><br></span><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(153,153,153)">The information in this email is confidential If you are not the intended recipient, you must not read or use that information. This email and any attachments are believed to be virus free however no responsibility is accepted by Clystnet for any loss or damage arising in any way from receipt or use thereof. Clystnet Ltd (company reg number 7164503) is based at Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX</span></p></div></div></div></div></div><br><br><div class="gmail_quote"><div dir="ltr">On Mon, 29 Oct 2018 at 16:33, <<a href="mailto:vtigercrm-developers-request@lists.vtigercrm.com">vtigercrm-developers-request@lists.vtigercrm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send vtigercrm-developers mailing list submissions to<br>
        <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers" rel="noreferrer" target="_blank">http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:vtigercrm-developers-request@lists.vtigercrm.com" target="_blank">vtigercrm-developers-request@lists.vtigercrm.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:vtigercrm-developers-owner@lists.vtigercrm.com" target="_blank">vtigercrm-developers-owner@lists.vtigercrm.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of vtigercrm-developers digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: vtiger 7.0 calendar access issue (IT-Solutions4You)<br>
   2. vtlib, setRelatedModules() associative array does not create<br>
      a related list. (Martin Allen)<br>
   3. Re: vtlib, setRelatedModules() associative array does not<br>
      create a related list. (Alan Lord)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 29 Oct 2018 13:38:24 +0100<br>
From: IT-Solutions4You <<a href="mailto:info@its4you.sk" target="_blank">info@its4you.sk</a>><br>
To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
Subject: Re: [Vtigercrm-developers] vtiger 7.0 calendar access issue<br>
Message-ID: <pr6urt$gnj$<a href="mailto:1@blaine.gmane.org" target="_blank">1@blaine.gmane.org</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
If I remember my right sharing rules don't work with Calendar (Task, <br>
Events) module. Calendar module has own "Calendar Sharing" setting. Each <br>
user can define own sharing criteria.<br>
But you can also set<br>
View All  - Can view all the modules information<br>
Edit All  - Can edit all the modules information<br>
in profile setting of Vice profile.<br>
<br>
Matus.<br>
<br>
<br>
<br>
<br>
D?a 29. 10. 2018 o 10:02 lucia digirolamo nap?sal(a):<br>
> Hi,<br>
> <br>
> in my vtiger I have the admin with role = CEO and a subrole called vice <br>
> which is not an admin, then I have a third role which is a subordinate <br>
> of vice. The vice role should have all the permission of the admin <br>
> except the delete, so the vice must be able to view/create/edit <br>
> everything, while the third role can view all the record but be able to <br>
> edit only the ones they created. To do that I created a sharing rule and <br>
> it works. The only problem is with the calendar. The calendar must <br>
> follow the sames rules so: vice can be able to view and edit all records <br>
> while third role can view all but can edit only the entries they've <br>
> created. The third role works as expected but the vice is not. At the <br>
> moment for calendar entries, the vice can view all the records but they <br>
> can modify only the record they've created. I need them to be able to <br>
> edit all the records.<br>
> <br>
> I've set all the entries to Public but this doesn't solve the issue.<br>
> <br>
> I've also tried to invite the other users just as a test but it doesnt <br>
> work either: the invited vice still cannot edit the record.<br>
> <br>
> Is there a way to set the calendar in a way that the vice role can view <br>
> and edit all the records?<br>
> <br>
> <br>
> _______________________________________________<br>
> <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 29 Oct 2018 16:04:46 +0000<br>
From: Martin Allen <<a href="mailto:martin.allen@clystnet.com" target="_blank">martin.allen@clystnet.com</a>><br>
To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
Subject: [Vtigercrm-developers] vtlib, setRelatedModules() associative<br>
        array does not create a related list.<br>
Message-ID:<br>
        <CAL1vgxEUVvDC63CA9zm9JPBN53v=<a href="mailto:DMX223FcLiX_Fy4%2Bw59zzA@mail.gmail.com" target="_blank">DMX223FcLiX_Fy4+w59zzA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
When creating a field using vtlib it is possible to pass an associative<br>
array to setRelatedModules() function which SHOULD create a related list in<br>
the related module.<br>
<br>
However it never correctly creates the list, as it can't call the function<br>
Vtiger_Module_Model::getRelationshipActions() .<br>
<br>
e.g. $field1->setRelatedModules(Array('Contacts'=>'Accounts')) should<br>
create a related list in Contacts module labelled 'Accounts', relating to<br>
the module that the field was in.<br>
<br>
Are we missing a include/require?? (Only including vtlib/Vtiger/Module.php<br>
and Field.php and Block.php)<br>
<br>
We tried including /modules/Vtiger/models/Module.php but still can't get it<br>
working??<br>
<br>
Any ideas, as the ability to add a related field and its equivalent related<br>
list in one call would be a great time saver!!<br>
<br>
Martin Allen<br>
<br>
*>>Call me now for free<< <<a href="https://emailrtc.voiceflex.com/?c=7b355216c4" rel="noreferrer" target="_blank">https://emailrtc.voiceflex.com/?c=7b355216c4</a>>*<br>
<br>
<br>
*01392 248692 - Main Office01392 690659 - Direct Line*<br>
<br>
*[image: signature2]*<br>
<br>
Have you visited our website recently? <a href="http://www.clystnet.com" rel="noreferrer" target="_blank">http://www.clystnet.com</a><br>
<br>
<br>
The information in this email is confidential If you are not the intended<br>
recipient, you must not read or use that information. This email and any<br>
attachments are believed to be virus free however no responsibility is<br>
accepted by Clystnet for any loss or damage arising in any way from receipt<br>
or use thereof. Clystnet Ltd (company reg number 7164503) is based at<br>
Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20181029/77c65185/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20181029/77c65185/attachment-0001.html</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image001.png<br>
Type: image/png<br>
Size: 10550 bytes<br>
Desc: not available<br>
URL: <<a href="http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20181029/77c65185/attachment-0001.png" rel="noreferrer" target="_blank">http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20181029/77c65185/attachment-0001.png</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 29 Oct 2018 16:31:48 +0000<br>
From: Alan Lord <<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>><br>
To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
Subject: Re: [Vtigercrm-developers] vtlib, setRelatedModules()<br>
        associative array does not create a related list.<br>
Message-ID: <pr7chh$rqa$<a href="mailto:1@blaine.gmane.org" target="_blank">1@blaine.gmane.org</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
Err, but you also need to specify which function to call to generate the <br>
related list of data and also what features are available from the <br>
related List, e.g. "ADD, SELECT"...<br>
<br>
Can't see how that would work some how, unless I am missing the point.<br>
<br>
Al<br>
<br>
On 29/10/2018 16:04, Martin Allen wrote:<br>
> When creating a field using vtlib it is possible to pass an associative <br>
> array to setRelatedModules() function which SHOULD create a related list <br>
> in the related module.<br>
> <br>
> However it never correctly creates the list, as it can't call the <br>
> function Vtiger_Module_Model::getRelationshipActions() .<br>
> <br>
> e.g. $field1->setRelatedModules(Array('Contacts'=>'Accounts')) should <br>
> create a related list in Contacts module labelled 'Accounts', relating <br>
> to the module that the field was in.<br>
> <br>
> Are we missing a include/require?? (Only including <br>
> vtlib/Vtiger/Module.php and Field.php and Block.php)<br>
> <br>
> We tried including /modules/Vtiger/models/Module.php but still can't get <br>
> it working??<br>
> <br>
> Any ideas, as the ability to add a related field and its equivalent <br>
> related list in one call would be a great time saver!!<br>
> <br>
> Martin Allen<br>
> <br>
> *>>Call me now for free<< <<a href="https://emailrtc.voiceflex.com/?c=7b355216c4" rel="noreferrer" target="_blank">https://emailrtc.voiceflex.com/?c=7b355216c4</a>>*<br>
> <br>
> *01392 248692 - Main Office<br>
> 01392 690659 - Direct Line*<br>
> <br>
> *signature2*<br>
> <br>
> Have you visited our website recently? <a href="http://www.clystnet.com" rel="noreferrer" target="_blank">http://www.clystnet.com</a> <br>
> <<a href="http://www.clystnet.com/" rel="noreferrer" target="_blank">http://www.clystnet.com/</a>><br>
> <br>
> <br>
> The information in this email is confidential If you are not the <br>
> intended recipient, you must not read or use that information. This <br>
> email and any attachments are believed to be virus free however no <br>
> responsibility is accepted by Clystnet for any loss or damage arising in <br>
> any way from receipt or use thereof. Clystnet Ltd (company reg number <br>
> 7164503) is based at Silverdown Park, Fair Oak Close, Clyst Honiton, EX5 2UX<br>
> <br>
> <br>
> _______________________________________________<br>
> <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
> <br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
vtigercrm-developers mailing list<br>
<a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.vtigercrm.com</a><br>
<a href="http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers" rel="noreferrer" target="_blank">http://lists.vtigercrm.com/cgi-bin/mailman/listinfo/vtigercrm-developers</a><br>
<br>
<br>
End of vtigercrm-developers Digest, Vol 153, Issue 25<br>
*****************************************************<br>
</blockquote></div></div>