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: Specifying a LEFT JOIN between entities?
Elliot Rodriguez
Posts: 15
 
Specifying a LEFT JOIN between entities?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jun 10 12:08 PM
Hi all:

I'm attempting to create a new Business Rule that queries 3 tables and returns a result for binding to a grid.

Here's what the code looks like so far:

public static void GetOpportunityQuotesWithCreditCheckStep(IOpportunity opportunity, out object result)
{
Sage.Platform.Repository.IRepository rep =
EntityFactory.GetRepository();
Sage.Platform.Repository.IQueryable qry = (Sage.Platform.Repository.IQueryable)rep;
IExpressionFactory ep = qry.GetExpressionFactory();

ICriteria criteria = qry.CreateCriteria();

criteria.CreateAlias("CE_QUOTE", "c");
criteria.CreateAlias("Opportunity", "o", JoinType.InnerJoin);
criteria.CreateAlias("RET_CREDIT_MATCH", "r", JoinType.LeftOuterJoin);
criteria.Add(ep.Eq("c.opportunityid", opportunity));
result = criteria.List();
}

When the form loads, I get an Ambiguous Match Found error.

http://slxdev:4546/SlxClient/Opportunity.aspx Ambiguous match found. at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) at System.Type.GetMethod(String name) at Sage.Platform.DynamicMethod.MethodTargetElement.ToMethodInfo() at Sage.Platform.DynamicMethod.BusinessRuleMethod.GetPrimaryParameters() at Sage.Platform.DynamicMethod.BusinessRuleMethod.GenerateDynamicMethodReturnObjectOrNone() at Sage.Platform.DynamicMethod.BusinessRuleMethod.GetDynamicMethod() at Sage.Platform.DynamicMethod.DynamicMethodLibrary.GetInvoker(String methodName) at Sage.Platform.DynamicMethod.DynamicMethodLibrary.Execute(String methodName, Object[] args) at Sage.SalesLogix.Entities.Opportunity.GetOpportunityQuotesWithCreditCheck() in c:\Documents and Settings\dramakri\Application Data\Sage\Platform\Output\implementation\Opportunity.cs:line 2491

I've only been working with SLXWeb and NHibernate for a week or so, so if there's anything obvious I'm missing or need to include, your help is appreciated. Basically I'm trying to bind a grid, and the SQL query in Oracle produces the desired results.

Thanks much!

EDIT - problem clarified in next post.
[Reply][Quote]
Elliot Rodriguez
Posts: 15
 
Re: "Ambiguous Match Found" errorYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jun 10 7:05 AM
While working on this I realized I am approaching the problem the wrong way and I should probably be creating this using a Relationship, but I can't get the result I want using App Architect.

I have a Grid that displays Opportunity information that is linked to another table (Quotes). The relationship is 1 Opp to M Quotes.

I also have an entity, RET_CREDIT_MATCH, that stores information related to Quotes. Not every Quote has a RET_CREDIT_MATCH entry, so I need to do a Left Join on these two entities.

I need to join all 3 entities together so that the Grid, when showing Opportunities, also shows information from RET_CREDIT_MATCH. As soon as I add RET_CREDIT_MATCH, however, my result set is zero records, clearly because of the Join I'm trying to do.

This is what the SQL should look like (simplified and shortened for demo purposes)

select o.*, c.*, r.* from CE_QUOTE c
INNER JOIN OPPORTUNITY o
ON c.opportunityid = o.opportunityid
LEFT JOIN RET_CREDIT_MATCH r
ON c.CE_QUOTEID = r.CE_QUOTEID
WHERE o.OPPORTUNITYID = 'my criteria'

I didn't see anything in the Developer videos describing Left Joins among entities. If someone could point me in the right direction, that would be great!
[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 11:59:27 PM