3/17/2026 6:29:00 AM
|
| |
| 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!
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.
|
|
|
|
7.5.1 dll for populating datagrid
Posted: 07 May 09 2:09 PM
|
I am compiling a C# dll to populate a datagrid. I want to include the Assigned to but it cannot resolve the property AssignedTo.OwnerDescription. What is the correct way to note it, Code is below:
Sage.Platform.RepositoryHelper rep = Sage.Platform.EntityFactory.GetRepositoryHelper(); Sage.Platform.Repository.ICriteria criteria = rep.CreateCriteria(); criteria.Add(rep.EF.Eq("Contact", contact)); criteria.SetProjection(rep.PF.ProjectionList() .Add(rep.PF.Property("TicketNumber")) .Add(rep.PF.Property("StatusCode")) .Add(rep.PF.Property("CreateDate")) .Add(rep.PF.Property("CompletedDate")) .Add(rep.PF.Property("UrgencyCode")) .Add(rep.PF.Property("AssignedTo.OwnerDescription")) .Add(rep.PF.Property("Account.Account")) .Add(rep.PF.Property("Subject")) ); |
|
|
|
Re: 7.5.1 dll for populating datagrid
Posted: 08 May 09 6:20 AM
|
Ted, I believe that you would need to do a join and then handle your projections with the prefix of the entity name such as;
IQueryable query = (IQueryable)EntityFactory.GetRepository(); IExpressionFactory expressions = query.GetExpressionFactory(); IProjections projections = query.GetProjectionsFactory(); ICriteria criteria = query.CreateCriteria("account") .CreateCriteria("Address", "address", JoinType.InnerJoin) <<-- here I add address to my list of projections .SetProjection(projections.ProjectionList() .Add(projections.Property("account.Id")) .Add(projections.Property("account.AccountName")) .Add(projections.Property("address.Address1")) .Add(projections.Property("address.City")) .Add(projections.Property("address.State")) .Add(projections.Property("address.Country")) .Add(projections.Property("account.MainPhone")) ).Add(expressions.Eq("account.ResellerID", account.Id));
Mark |
|
|
| |
|
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!
|
|
|
|
|
|
|
|