CoreBOSBB
Gendoc get the name of account_id - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Modules/Extension Support (https://discussions.corebos.org/forumdisplay.php?fid=9)
+--- Thread: Gendoc get the name of account_id (/showthread.php?tid=1497)



Gendoc get the name of account_id - addady2 - 05-05-2019

Hello,

I create document template to ticket. In my CRM the tickets are "Related To" contact (and not organization).
In that template I would like to embed also the contact organization name.

It let me embed {Contacts.account_id} which represent the internal number of organization.

Is there a way to embed the name of the organization, and any other data of this specific "account_id"


Thanks


RE: Gendoc get the name of account_id - joebordes - 05-05-2019

If I remember correctly, to go "down" more levels in GenDoc you use {foreach}, so the first thing I would try is something like

{foreach Contacts}
{foreach Accounts}
{accountname}
{/foreach}
{/foreach}


RE: Gendoc get the name of account_id - addady2 - 05-05-2019

(05-05-2019, 10:37 AM)joebordes Wrote: If I remember correctly, to go "down" more levels in GenDoc you use {foreach}, so the first thing I would try is something like

{foreach Contacts}
{foreach Accounts}
{accountname}
{/foreach}
{/foreach}


It fail, adding this code cause GenDoc to create partial odt until the code.
I tried to create simple example in using user demo in https://demo.coreboscrm.com/
but this user can't create ticket "You are not permitted to execute this Operation"

Please note that there is 1:1 relation between Ticket to Contact and between Contact to Account.


RE: Gendoc get the name of account_id - joebordes - 05-05-2019

If you read the documentation it says to do this when it needs to go from Inventory Details to products, please read that part of the documentation and make sure


RE: Gendoc get the name of account_id - addady2 - 05-06-2019

(05-05-2019, 04:28 PM)joebordes Wrote: If you read the documentation it says to do this when it needs to go from Inventory Details to products, please read that part of the documentation and make sure

I guess you mean this documentation:
http://corebos.com/documentation/lib/exe/fetch.php?media=gendoc:gendocdocumentation.odt

So in may case there is a way to do it ?


RE: Gendoc get the name of account_id - joebordes - 05-06-2019

I read the documentation and there is a paragraph that does something similar going from an Invoice to the related list of Contacts, but I am not an expert of GenDoc, I redirected your question to people with more knowledge than me about it, see if we can get an answer


RE: Gendoc get the name of account_id - addady2 - 05-07-2019

(05-06-2019, 04:26 PM)joebordes Wrote: I read the documentation and there is a paragraph that does something similar going from an Invoice to the related list of Contacts

Yes I read it too. Its not the same case. I my case it one link more.


RE: Gendoc get the name of account_id - joebordes - 06-14-2019

try it like this and let us know

Code:
{foreach Contacts}
{foreach Accounts}
{Accounts.accountname}
{/foreach}
{/foreach}



RE: Gendoc get the name of account_id - joebordes - 07-04-2019

Kiko fixed this issue today. Thanks for informing!

https://github.com/tsolucio/corebos/commit/7d625ddb083c66751f1d755b630a25e9ea90b800