cc'eing Contact Person of Attorney

Discussions related to ReadyDoc development.
Post Reply
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

cc'eing Contact Person of Attorney

Post by Miri Yosef »

Does anyone know of a way I can code a letter to cc all contact persons of the attorneys with the firm name they are associated to. My problem is that the contact person have no field for the attorney firm name. The way I need it is:
Contact person name
Contact's Attorney firm name
Contact's Address
Contact's Fax Number
Mark McKenna

Re: cc'eing Contact Person of Attorney

Post by Mark McKenna »

To some degree it depends on the primary context of your ReadyDoc, but let's assume since it is a letter to an Attorney that you have set it to be {{Order.Attorney}}. In such a scenario, you could do this:

Code: Select all

<FOREACH {{.Person}}>
{{.Name}}
{{.OrderContact.Name}}
{{.Address1}}
{{.Fax}}
</FOREACH>
Note how {{.OrderContact.FieldCode}} serves to point backward from a person to the order contact that he/she is associated with.

If your document is meant to list all Attorneys in an order, and the people for each, you would assign the primary context as {{Order}} and do something like this:

Code: Select all

<FOREACH {{.Attorney}}>
{{.Name}}
<FOREACH {{.Person}}>
{{.Name}}
{{.Address1}}
{{.Fax}}
</FOREACH>
</FOREACH>
Here, the outer FOREACH "Attorney" is evaluated against the Order, and the inner FOREACH "Person" is evaluated against each Attorney as the outer loop progresses.
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: cc'eing Contact Person of Attorney

Post by Miri Yosef »

Thanks,

That was very helpful
Post Reply