Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

HQL Data Source Question

Excuse my freshness as far as HQL is concerned - I'm probably going about this the wrong way. Here's my 7.5.3 scenario:

 

I have a new entity x which has zero or more activities (so Activities is a child property of x).

 

I have created an Entity Page for x and I want to display associated Activities in a tab view.

 

All OK so far. My problem is that I want to display the username of the user to whom the Activities are assigned. I guess I could add Userinfo as a child property of Activity (mapped on UserId), but was hoping to do it via an HQL data source.

 

In my From clause I have the following:

Activity a, UserInfo u

 

and in my Where clause:

(a.AccountContactReportID = :crID) and (a.UserId = u.UserId)

 

where crID is the entityID of the 'current' entity, as specified under Parameters.

 

This builds and deploys OK, but when I access the page in a browser, I get a long error. The meat of it is as follows:

 

 

http://localhost:3333/SlxClient/ContactReport.aspx?entityid=QEVALA0000NR&gid=pEVALA0000C7 could not resolve property: UserId of: Sage.SalesLogix.Security.UserInfo [select a.Notes, a.StartDate, u.UserName from Sage.SalesLogix.Activity.Activity a, Sage.SalesLogix.Security.UserInfo u where (a.AccountContactReportID = :crID) and (a.UserId = u.UserId) order by a.StartDate ]

 

Obviously an issue with Userinfo.UserId, but what? Is it that there are two fields called UserId and HQL cannot differentiate? Or perhaps doing a join in this (let's face it, old fashioned) way is not supported in HQL?

 

 

Any input appreciated as always.

 

Highlighted
Employee
Posts: 629
Registered: ‎04-24-2009

Re: HQL Data Source Question

The Sage.SalesLogix.Security.UserInfo interface provides access to the UserInfo.UserId value via the User.Id property (i.e. User[dot]Id).

 

Thanks

 

Mike

Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

Re: HQL Data Source Question

Hi Mike

 

If you check the error message included with my first post, you'll see that that is exactly what I tried. At least I think that's what you mean Smiley Happy

 

I had to get past this, so I ended up creating suitable properties between the entities and that worked fine, so no worries.

 

Thanks for responding.

 

Phil

 

 

Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

Re: HQL Data Source Question

Sorry, I just reread your post and that's not what I tried! I'll have another go with an HQL datasource at some point.

Highlighted
Employee
Posts: 629
Registered: ‎04-24-2009

Re: HQL Data Source Question

Ok, also, the Id property of the UserInfo object will return the UserId as well (i.e. u.Id).

 

Thanks

 

Mike