function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
qsdunnqsdunn 

Objects From Look-up Fields in Reports

This seems like such a simple thing, I almost feel stupid for not being able to do it but I can't:

 

I've created a custom lookup field on Accounts, to Contacts, called Contact To Invoice.

I want to create a Report (for a mail merge) that pulls fields from Account plus some from the Contact linked to by Contact To Invoice (if any). If the Contact To Invoice field is null, these fields would, presumably, be blank.

 

I can create a Report on Accounts alone, which includes the Contact To Invoice field, but that only lists the name (it's also a link but that's not useful in a mail merge).

I can create a Report on Accounts with Contacts, which lists *all* Contacts belonging to the Account but can be filtered to only show the one who is also Contact To Invoice (because filter criteria can only compare fields to static values not to other fields).

I can create a Report on Contacts with Accounts which *will* show only the right Contacts but will omit any Accounts without a Contact To Invoice.

I can create Report on Accounts with Contact with Accounts but that doesn't work either and is starting to get ridiculous...

 

 

Any help guys?

 

Best Answer chosen by Admin (Salesforce Developers) 
melbamelba

Create a custom report type on Accounts.  When you do this, you will have the ability to select which fields to make available to you in the report wizard.  When you have lookup fields, custom report types allows you to drill into the related objects and grab the fields you need.  I use this process all the time, since I cannot always get at the key fields I need for my reporting.

All Answers

shillyershillyer

If Contact To Invoice is a parent of Account, then you can create formula fields on Account that pull data from the parent. Then in your report, you can view Account and Contact To Invoice data.

 

Hope that helps,

Sati

qsdunnqsdunn

Hmmm... I don't like to do it because it smacks of redundant data but I guess it will work.

 

Thanks

melbamelba

Create a custom report type on Accounts.  When you do this, you will have the ability to select which fields to make available to you in the report wizard.  When you have lookup fields, custom report types allows you to drill into the related objects and grab the fields you need.  I use this process all the time, since I cannot always get at the key fields I need for my reporting.

This was selected as the best answer
qsdunnqsdunn

Thanks Melba, I never would have thought of that but it's so simple! It also help's me with another similar issue I've been struggling with in the meantime :smileyvery-happy: