2

When adding fields via lookup to a custom report type why don't i get custom user fields in the option on the Owner field? All custom fields are available for the Last Modified By and Created By user lookup. Is it because the Owner can be a user/queue? If yes or otherwise, how do i overcome this? My objective is to have custom fields on the user object to be filtered upon in the report.

3

While I haven't seen it documented, it seems highly likely that this is indeed because the owner "lookup" is a polymorphic relationship which can point to more than one sobject type. There have been a number of ideas raised about this, and custom fields are available on custom report types based on accounts and contacts, so it looks like something that Salesforce have to add on a piecemeal basis.

The way I've handled this in the past is to create a user lookup on the sobject and have triggers populate this when a record is created or changed. Depending on which sobject this is and your setup, you may have to jump through a few hoops - for example, transfer of an account and all associated opportunities/contacts doesn't fire triggers on contacts and opportunities.

0

Not sure if this is similar to your problem or not, but I needed to report on users that were the owner of Contracts that were expired, and retrieve their custom fields.

I achieved this by reporting on the User (so that all the User fields were there), and then doing a Cross Join to Contract (Contract Owner) and then filtering the Contracts on the expiry criteria.

The end result was the list of users, with all their custom fields, that were the Contract Owner of a Contract that had expired.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.