Tag: IRepository

  • Content Type

How to Sum a Collection using Hibernate Criteria and Projections

 To sum the results of a criteria collection you can use code such as the following, which gets the sum of all ticket activities for a ticket:             Sage.Platform.RepositoryHelper<Sage.Entity.Interfaces.ITicketActivity>  repository = Sage.Platform.EntityFactory.GetRepositoryHelper<Sage.Entity.Interfaces.ITicketActivity>();         ...

Returning the sum of fields using IRepository in SalesLogix

One of the other things that you can do with the IRepositroy collection in SalesLogix is to perform a summation of a entity field after filtering for a group of records.  Lets look at how to do this:     Sage.Platform.RepositoryHelper<Sage.Entity.Interfaces.IOpportunity> repository =    Sage.Platform.EntityFactory.GetRepositoryHelper<Sage.Entity.Interfaces.IOpportunity>();    Sage.Plat...

Using IRepository and ICriteria when you have 3 Or conditions

  I recently ran into a case where I had to query an Entity in SalesLogix to find records where a user was in any one of three fields.  ICriteria has an Or operand but that is for comparing only two fields.  So how do you do three?  With Disjunction.  Here is an example: Sage.Platform.RepositoryHelper<Sage.Entity.Interfaces.IAccount> […]

Returning a distinct result set using IRepository in SalesLogix

Using IRepository in the SalesLogix web client can allow querying the SalesLogix entity model directly, similar to how you used to query the database directly using T-SQL queries. Ryan has already created a great post here about this, and I expanded on that here. Today I want to talk about one more functionality of the IRepository, that is how to use Projection to return a distinct list of records from your query.

Using ICriteria and Not to exclude records in SalesLogix

In SalesLogix you can use the Sage.Platform.Repository.ICriteria class to query the entity model using standard ICriteria.  One thing I have been asked in the past is how do you exclude certain conditions?  A common example might be show me all of the non-closed tickets for a contact, where being closed is denoted by a status=”Closed”.  […]

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!