Community
Showing results for 
Search instead for 
Do you mean 
Reply

Lookup Classes with No Constructor ???

Astute Commentator
Posts: 11
Country: USA

Lookup Classes with No Constructor ???

I'm trying to do a company lookup using ComparisonFilterCriteria but for the life of me, I cannot figure out how to do it.

 

It seems that the relevant classes all have Private Constructors and there is no way to get an instance of those classes.

 

For example.

 

Act.Framework.Lookups.CompanyLookup companyLookup = new Act.Framework.Lookups.CompanyLookup();

 

throws the following exception

 

The type 'Act.Framework.Lookups.CompanyLookup' has no constructors defined

 

Same thing with the LookupManager

 

So I cannot use 

 

companyLookup.GetCompanies(...)

or

lookupManager.LookupCompanies(...)

or

lookupManager.LookupCompanyReplace(...)

 

What gives?  Really, really, really, frustrating.  If the object instantiation has to go through some logic, there should be a STATIC CompanyLookup.GetInstance() or a CompanyLookup.CreateInstance() method to get you an object.

 

Perhaps I'm doing something wrong?  What can it be?

 

Using Sage ACT! Premium 2012 Version 14.1.108.0

 

Any help would be highly appreciated.

 

Astute Commentator
Posts: 11
Country: USA

Re: Lookup Classes with No Constructor ???

[ Edited ]

One minor correction...that error is not an Exception...it is a compile-time error.

Astute Commentator
Posts: 11
Country: USA

Re: Lookup Classes with No Constructor ???

OMG...someone please delete this thread.  Figured it out.  Was mixing up a namespace alias with my Act Framework object reference. Duh! Total Brain Fart!  Sorry. 

Silver Super Contributor
Posts: 2,328
Country: USA

Re: Lookup Classes with No Constructor ???

We've all been there some time or other.  I wouldn't worry too much about it.

 

Stan


If you would like to get more out of ACT! you can find an ACT! Certified Consultant near you by going to:www.act.com/acc.
-------------------------------------------------------------------------------------
Stan Smith
ACT! Certified Consultant
ADS Programming Services, Inc.
(205) 222-1661
www.adsprogramming.com
www.actwebhosting.com
Click Here to Purchase Act!