+ Start a Discussion
TotalNoviceTotalNovice 

Help with Print Anything


I have a SOQL query (not retrieve) that returns multiple records of contacts.  I can see it run and produce correct number of records but I can not make them print in my template.  Here is the query:
Select c.AccountId, c.Department, c.Email, c.FirstName, c.LastName, c.Phone, c.Title,c.Key_Contact__c from Contact c where c.AccountId='{Account1.Id}'
 
And here is template code:
   <prtany:repeat record="Contact2">
    <tr>
     <td>{Contact2.FirstName.n}</td>
     <td>{Contact2.LastName.n}</td>
     <td>{Contact2.Title.n}</td>
    </tr></PRTANY:REPEAT>
 
When I run package in debug mode it gives me radio buttons for contacts to choose, but after I click on one, it still does not print any contact records, however contact merge fields are displayed as Contact2.n.LastName.  What I am doing wrong?
Ron HessRon Hess
what did you enter for the retrieve field in your printer package?

to reproduce this would need to see each query and is this the complete template?


TotalNoviceTotalNovice

Ron, first of all, thank you so much for responding!

That query is not a retrieve, just SOOQL, and no, that is not complete template, just the part that supposed to display contacts records for account.

My 1st query is retrieve from Account based on Parameter.eid (account.id) sent from custom button for print package on account screen.

My 2nd query is just SOOQL select statement to retrieve contacts for the account:

Select c.AccountId, c.Department, c.Email, c.FirstName, c.LastName, c.Phone, c.Title,c.Key_Contact__c from Contact c where c.AccountId='{Account1.Id}'

I don't have anything in Retrive Entity field since it is not a retrieve query.  It does produce correct recordset, but I can't get the records displayed.  However account info is displayed correctly in the template.  Has contact query to be "retrieve" and not SOOQL? 

Ron HessRon Hess
ok, i followed your steps and got it to work, had to change the case of the close tag, and move it to a new line, not sure why.

here is my entire template file

Code:
<table>
<prtany:repeat record="Contact2">
<tr>
<td>{Contact2.FirstName.n}</td>
<td>{Contact2.LastName.n}</td>
<td>{Contact2.Title.n}</td>
</tr>
</prtany:repeat>
</table>

 

TotalNoviceTotalNovice

Ron, I replaced my template with yours and still all I am getting is this and after I click on any radio button, nothing happens:

Please choose a Contacts

Ron HessRon Hess
are you on this version
Print Anything (Version 8.1.11)


i'm not seeing the radio list when i run , probably a config option that i'm not setting
TotalNoviceTotalNovice
How can I tell?  I installed it in July...  And it's not even configurable because is a managed app...
Ron HessRon Hess
look under Setup-> App Setup -> Excange -> intalled apps.

is debug set on or off?
TotalNoviceTotalNovice

It is 8.1.11.  I tried removing debug = "1", but the only difference was that I didn't get any merged info.

I

Ron HessRon Hess
in the second query in the sequence (one with soql), click Edit on that query and clear out the field "Singleton Field List"

that should do it.
TotalNoviceTotalNovice

Ron, you are an absolute GENIUS!!!  Thank you so much!  I was ready to jump from GG bridge!

Thanks again and please take care of yourself because people like me need you!

 

Ron HessRon Hess
see you at dreamforce ?!
you can find me in the developer lounge :smileywink:
TotalNoviceTotalNovice
Clearly I am not ready for a developers lounge, but I'll try to peek...
darhdarh
Ron,

Could you please take a look at:
http://community.salesforce.com/sforce/board/message?board.id=scontrols&message.id=1647

A bunch of us can't get the latest version of Print Anything to work.