Community
Showing results for 
Search instead for 
Do you mean 
Reply

Complete Simple Example Projects?

Copper Contributor
Posts: 12
Country: USA

Complete Simple Example Projects?

Are there any complete VB.NET and C# example projects that contain full code with all references, etc. for making it easy to see exactly how to use every feature of the SDK?  I've used the ACT! 6.0 Application and Database objects in the past with VB 6.0 and the documentation was pretty good.  I'm trying hard to migrate to VB.NET and get my head around it, but the examples all seem to be assuming baseline knowledge the newbie doesn't possess.  It's very frustrating to say the least.

As an example, I'd like to build a simple windows forms app that:

Retrieves the current user's name, UID and a few field values from the My Record.
Retrieves and sets some variables with field data from the current contact.
Does some stuff with the data.
Writes a history record to the current contact's record.
Moves to the next contact in the lookup and does the same.

 

Something that shows everything you need to do in one neat, complete example project would be soooo groovey! 

The "complete add-on examples" mentioned in the SDK docs are conspicuously abscent!

Employee
Posts: 1,163
Country: USA

Re: Complete Simple Example Projects?

There are a number of sample projects that can be found in the developers download section of this forum:

 

http://community.act.com/t5/Sage-ACT-Developer-Downloads/bd-p/ADN_Downloads

 

I'm not sure there is a one that meets all of your criteria, however they are complete projects and there are  examples of accomplishing most of these tasks on this forum. If you have trouble finding any one in particular feel free to reply to this thread with more specific questions.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 12
Country: USA

Re: Complete Simple Example Projects?

Hi Matthew;

I found a sample app that looks like what I need to get where I want.  It's the Freamwork.Samples.Forms app in the ACT! 2007 SDK.  The problem is, that when I compile it to check it out with ACT! 2010 and VS 2010, it kicks 7 errors and 84 warnings.  Is there a current version of this project to get me going without all the headaches of trying to figure out all of these problems?

Thanks! 

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Complete Simple Example Projects?

Hiya,

 

If your familiar with the ACT! Classic SDK you'll know that accessing the ACT! application can be done via either the Object model or the application model (using the old nomenclature). This is sort of the same in the new .NET world for ACT!.

 

To create independent .exe apps you generally use the Act.Framework model and for creating a plugin that interacts with the ACT! application e.g. to respond to user events etc, you would use the Act.Application framework.

 

Due to the true OO nature of the modern version of ACT! to create a single example SDK app like what Duane Anderson had done in the old SDK, would take quite a lot of work by the SDK dev team and I reckon they just dont have the time to do that!

 

My personal recommendation would be to start with trying to create a simple Framework app that logs into the dB pulls up the My Record Card and then various data fields and then practice simple IO. I know that sounds easier then actually doing but I would say the rule of thumb with the ACT framework is to approach each Entity type or Record Type via its associated Manager class. So if for example you wanted to deal with Contacts you would be using the Act.Framework.Contacts.ContactManager class for general access to the entity.

 

I would be more than happy to help with specific queries but the intial query to provide a fully working application which demonstrates every aspect of the SDK including both the Application and Framework API is far too large a task and I have a day job to do as well! Smiley Wink Hahaha

 

Have you been able to write working code to log into a dB yet? 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Copper Contributor
Posts: 12
Country: USA

Re: Complete Simple Example Projects?

Hi Vivek;

 

Not yet.  With the old ACT! 6 SDK, I used to be able to use both the application and database objects to accomplish anything I wanted, like get the current lookup, return the UIDs to the database object and create a lookup of them there and do the processing.  

So far, I've figured out that the best path is likely to implement a form within a plugin to provide that access and functionality.

The Framework.Forms example  from the 2007 SDK appears to have what I need, but simply doesn't work with ACT! 2010 and VS 2010.  It kicks 7 errors and 84 warnings.  After taking out the offending sections that are not relevent to what I'm trying to do, I'm left with 74 warnings about non-CLS compliance of the types and methods of the Act.framework and 1 error:

 

Error1Could not load referenced assembly "E:\Downloads\ACT!2007 SDK\Framework Sample Solution\Framework.Samples.CSharpSamples\obj\Debug\Framework.CSharp.dll".  Caught a FileNotFoundException saying "Could not load file or assembly 'E:\Downloads\ACT!2007 SDK\Framework Sample Solution\Framework.Samples.CSharpSamples\obj\Debug\Framework.CSharp.dll' or one of its dependencies. The system cannot find the file specified.".E:\Downloads\ACT!2007 SDK\Framework Sample Solution\Framework.Samples.Forms\ResGenFramework.Forms

 

Searching for the file doesn't find it.


What I want to accomplish is to obtain the current user's name and field data from the open instance of ACT! and the current lookup from same to process and update the history on each record with the results of the process.  The app will have a couple of simple windows forms.  

Copper Contributor
Posts: 12
Country: USA

Re: Complete Simple Example Projects?

I've managed to get the sample.forms app running - building it makes the error go away! Then it will run (after getting rid of and updating obsolete references, etc. ). It doesn't retrieve the current act user's My record; instead it makes you login. Requesting the contact list, simply produces a list of all of the contacts. Is what I'm trying to do possible without adding a login dialog and a lookup dialog?
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Complete Simple Example Projects?

I may be able to help with some examples VS projects. Let me know what events you are trying to hook into and what you would like to do?

 

Thanks

-- Jim Durkin

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Complete Simple Example Projects?

Hi,

 

Ok that should be fairly simple to do. From what you've written I suspect that you really want to create a Plugin for ACT! so that once the User has already logged into ACT! via the application they do not have to do it a second time. A very quick way of creating a plugin is to use the VS template thta can be found in the Dev Downloads section. This template will give you the basic core code for creating a plugin.

 

You'll need to capture the ViewLoaded Event of the ActApplication so that your plugin "knows" when the User has successfully logged into the dB and the Default View of the application has loaded (as a side note I don't think the Welcome screen fires this? but I could be wrong).

 

I usually seperate my workhorse code from the plugin code by creating a Static class called Utils or something and I call static methods etc from the to it from the Plugin class. So if that is all ok, here is how you could get the Current User and display the My record card:

 

public static ActApplication actApp;

 

User u = actApp.ActFramework.CurrentUser;

actApp.UIContactManager.ShowContact(u.Contact);

 

=========

 

Another way to do the same thing could be:

 

actApp.UIContactManager.ShowContact(actApp.ActFramework.Contacts.GetMyRecord());

 

==========

 

Remeber all this is in a Plugin dll which will reside in the Plugins folder in Prgram Files. You wouldn't be putting refs to the ActApplication object within a Framework application.

 

HTH

 

 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Copper Contributor
Posts: 12
Country: USA

Re: Complete Simple Example Projects?

I've solved the issues I was having, although it was like pulling teeth. That's MS for ya - make everyone waste their time by changing how everything works, so they can pretend it's "new". Thanks to everyone who responded. Hiring an experienced .NET / ACT! developer to spend an hour with me did the trick.