+ Start a Discussion
paulmag32paulmag32 

Custom link to create report based on user

Hi there I want to create a custom link that will sit in the "custom link" section of the home page and allow users to view their business lines. Because business lines is a custom object it doesn't have an owner field so i have created a custom field and populated that with their user id. When I try to run the report from the custom link the filter returns "Owner ID equals {!User.Id}" instead of the user ID.

 

Any help gratefully appreciated.

 

Thanks

 

Paul

IspitaIspita

hi,

Irrespective of the field name  {!User.Id} - does it pull the data for you ?

You must be using a parameterized report, isn't it?

Also you can ideally use ParentObjectNameId.OwnerId , does this serve your purpose?

Let me know ....

paulmag32paulmag32

Hi,

 

No the report remains blank because instead of the report pasting in the SF user ID it just adds the text {!user.id} which of course doesn't equal the user ID.

 

There is no owner.ID field on the object which I thought was a bit odd but I assumed it is because it is a custom object?

 

this is the code I am trying to get updated

/00OD0000004UeCh?pv0= {!User.Id}

IspitaIspita

Hi,

Your object doesnt have an owner field but the parent object does have owner field doesnt it?

But it surely has a Master-detail field say for ex.g. Parentid pointing to the parent object ? doesn't it??

Now lets suppose that field has the value Parentid append it with a dot operator and access the parent's owner field viz :-

Parentid.ownerid -> shouldn't it work ??

 

Let me know

 

paulmag32paulmag32

Hi there, yes I see what you are saying but the parent object (in this case Account) is owned by the system admin as multiple users can "own" it. Am afraid that solution won't work for me.

 

Paul

IspitaIspita

What is the name of the field in which you are storing the userid?

paulmag32paulmag32

I have just called it "Owner ID" and will populate it with the salespersons ID.

 

If I was running the report manually it would be fine I could simply edit the report and have it say Owner ID equals xxxxx and it would run.

 

The issue is that the link formula just pastes in the text calling the user id rather than the users id.

This link is being run from the home page don't that that should matter though?

 

Paul

IspitaIspita

Try this and let me know if it works:-

 

/00OD0000004UeCh?pv0= {!YOurObjectName.OwnerId}

paulmag32paulmag32

Hi there tried this

 

/00OD0000004UeCh?pv0= {!Business_Line.Owner_ID }

 

and got the following error " Field Business_Line.Owner_ID does not exist check spelling"

 

The below are copied from SF so i think i'm using the correct syntax?

Field Name Owner_ID

Object Name Business_Line

 

thanks for the help so far

 

Paul

IspitaIspita

try using:-

 

/00OD0000004UeCh?pv0= {!Business_Line__c.Owner_ID__c }

 

 

or

 

/00OD0000004UeCh?pv0= {!Business_Line.Owner_ID__c }

 

 

either of these should work 

paulmag32paulmag32

Hi there it still doesn't seem to be accepting the Owner_ID field on the business line object. I get the same error as before