Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Hql
Andrew James
Posts: 51
 
HqlYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Nov 10 6:06 AM
fiogf49gjkf0d

Hi All


I am trying to add more fields onto the Notes datagrid.  Adding fields from the current table is easy enough as below


 


if (_hqlBindingSource == null)<br />            {
                List<HqlSelectField> sel = new List<HqlSelectField>();
                sel.Add(new HqlSelectField("id", "HistoryId"));
                sel.Add(new HqlSelectField("Description", "Description"));
                sel.Add(new HqlSelectField("CreateDate", "CreateDate"));
                sel.Add(new HqlSelectField("Notes", "Notes"));
                sel.Add(new HqlSelectField("CreateUser", "CreateUser"));
                _hqlBindingSource = new WebHqlListBindingSource(sel, "History");
            }
            return _hqlBindingSource;

 


However I am not to sure how I would change the CreateUser to FirstName,LastName from the userinfo table.


Also does anyone know any good sites so I can learn a little more on Hql as so far all my developments have used SQL commands only

[Reply][Quote]
Andrew James
Posts: 51
 
Re: HqlYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Nov 10 6:29 AM
fiogf49gjkf0d

I been to busy looking at the internet when the solution is right in front of me in another page Embarassed


also what are the Pro's / Con's of using Hql over Sql?


if (_hqlBindingSource == null)<br />            {
                List<HqlSelectField> sel = new List<HqlSelectField>();
                sel.Add(new HqlSelectField("h.id", "HistoryId"));
                sel.Add(new HqlSelectField("h.Description", "Description"));
                sel.Add(new HqlSelectField("h.CreateDate", "CreateDate"));
                sel.Add(new HqlSelectField("h.Notes", "Notes"));
                sel.Add(new HqlSelectField("ui.UserName", "UserName"));
                _hqlBindingSource = new WebHqlListBindingSource(sel, "History h, UserInfo ui");
            }
            return _hqlBindingSource;

 


and the where clause is done onformbound


 


HqlBindingSource.Where = string.Format("h.UserId = ui.id and Type = {0} and {1} = '{2}'", (int)HistoryType.atNote, keyId, entityID);<br />        
HqlBindingSource.OrderBy = "CompletedDate desc";
        HqlBindingSource.BoundGrid = grdNotes;
        grdNotes.DataBind();
[Reply][Quote]
mark
Posts: 70
 
Re: Hql...Please HelpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Dec 10 4:35 AM
fiogf49gjkf0d

Hi


I am trying to use the HQLdatasource control on my smart part. I have taken a HQL Datasource Control and a datagrid.


I have given all the property names such as columns, table name in my property window and mapped it to Datagrid.


But i am getting an error like



OPPORTUNITY_CONTACT


is not mapped (select CONTACTID from OPPORTUNITY_CONTACT)


Please Help


Thanks,


Mark


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Hql...Please HelpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Dec 10 12:46 PM
fiogf49gjkf0d

HQL goes after OBJECTS, SQL goes after fields and tables.


If you don't define the fields and tables in an object (XML file, what have you) then referring to a missing ojbect in an HQL statement will give you an error.....

[Reply][Quote]
mark
Posts: 70
 
Re: Hql...Please HelpYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 11 1:29 AM
fiogf49gjkf0d

Thanks RJ. I got it! Thank you very much for the help


 


Regards,


Mark


 

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/29/2025 9:10:58 AM