Login / Register  search  syndication  about

          Infor CRM Questions & Answers

Your place to get answers to your SalesLogix related questions.

 Home  |   Subscribe via RSS  |   Subscribe via E-mail  |   

Compiling a C# DLL to Populate a Datagrid in SalesLogix v7.5.1

Question: I am compiling a C# dll to populate a datagrid in SalesLogix v7.5.1.  I would like to include the Assigned to, but it is unable to resolve the property AssignedTo.OwnerDescription.  Here is my code:
 
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"))
);
 
How can I do this?
 
Answer: You will need to create a join and then handle your projections with the prefix of the entity name.  Example:
 
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));

What's This?
  
Bookmark and Share

About SalesLogix Support

   Your SalesLogix Business Partner for SalesLogix Support.


Related Content
   Can I Bind an Attachment to a Specific Activity in Infor CRM version 7.54?
Recently I had a user ask if they could bind an attachment to a specific Activity within Infor CRM??
Posted on Jul 07, 2015 by Dale Richter to Infor CRM Questions & Answers
 
   Infor CRM (Formerly Saleslogix) Iterating through all tabs on a Page
 Using the TabWorskpace you can iterate through all the tabs on a page and do something with them, l
Posted on Jun 19, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
   Infor CRM (formerly SalesLogix) Administrator Locked Out
I thought I had seen all the issues affecting the datalink but this was a new one. We could not login t
Posted on Jun 18, 2015 by Mark Duthoy to SalesLogix Support
 
   Infor CRM (Formerly Saleslogix) Hiding Tabs at Runtime Without Using Modules
 As Ryan wrote a long time ago, you can create a module and add it to a page in the Infor CRM web cl
Posted on Jun 10, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
   How I assign ownership to a group of Leads in Infor CRM?
There is a tool within Infor CRM to align Accounts to different Account Owners. It is called Territory Re
Posted on Jun 05, 2015 by Dale Richter to Infor CRM Questions & Answers
 
Comments

No Comments
All contents Copyright © 2015 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register