Checking for Values in SmartParts Before an Opportunity is Created in SalesLogix

Question: On the insert Opportunity form in SalesLogix I’m trying to check that
the products and contacts SmartParts contain values before a new
opportunity is created.  How can I refer to fields on a SmartPart within
a main form in SalesLogix?

Answer:  Instead of checking the values on the SmartParts, check the entity
property values.  If you would like to check if there is a product do
something like this:

Sage.Entity.Interfaces.

IOpportunity opp = (Sage.Entity.Interfaces.IOpportunity)this.BindingSource.Current;

if(opp.Propducts.Count < 1)
{
//They haven’t added a product, so exit save function: show a message or whatever..
return;
}

If you don’t want to edit the Save method directly you can wrap these in validation business rules and call them.

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

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!