05-21-2010 11:02 AM
Externally to ACT:
Can anyone point me to a Visual Studion .NET app (VB) that contains a working sample of:
1) Adding a record to the CONTACT table
2) Update a field in the CONTACT table.
3) Queries the CONTACT table for a record
Although I've worked with ACT in the past, It's my first experience with the ACT database being a Microsoft SQL database.
ACT! by Sage Premium for Web 2010 Version 12.0.409, Hotfix 3
I've written web apps that access Microsoft SQL and Mysql databases in the past but am having a bit of trouble getting over the SDK learning curve.
My intention is to write a lead acceptor to allow data collected on web forms to make it into the ACT contacts table with the ability to query the contacts table first to handle duplicates.
Thanks in advance.
05-21-2010 11:40 AM
I don't have a project already put together, but I can provide some sample code that accomplishes these tasks.
//Create new contact
Contact c = afw.Contacts.CreateContact();
c.Company = "Company";
c.FirstName = "John";
c.LastName = "Doe";
//...etc for various contact table specific info
//IIRC this works, but haven't done it in a while
c.Fields["FIELD NAME"] = "";
object str = c.Fields["FIELD NAME"];
//This I think is the preferred approach
DBFieldDescriptor fd = afw.Contacts.GetFieldDescriptor("TBL_CONTACT.FULLNAME");
ContactList cl = afw.Contacts.GetContacts(null);
05-21-2010 11:43 AM
Almost forgot, you can also use the OLE to access table data outside the application
DataTable dt = new DataTable("myTable");
OleDbConnection strConn = new OleDbConnection(ActFwk.CurrentACTOLEDB2);
OleDbCommand command = new OleDbCommand("SELECT TOP 50 [ContactID] FROM TBL_CONTACT", strConn);
OleDbDataAdapter oleAdapter = new OleDbDataAdapter(command);
dgOle.DataSource = dt;
05-21-2010 02:06 PM
Thanks so much for the quick response!
I'll definitely give the code snippets a try.
I've found that code snippets work much better for me than an object reference guide.
Does anyone have a working vb.net project (see above for short requirements) even for a fee? 2003/2005/2008/etc?
I'm looking forward to working this out (you always learn more that way), but time is short.
05-25-2010 09:05 AM
+1 to John's request. It sounds as if John and I are in the same boat. mwood's response is informative but not quite complete in that it doesn't show any using/include files that are needed. I have a binder of samples but none show everything. As with John VB would be great though I can dissect C#.
My client's IT manager is setting up a development server as I type so hopefully I'll be able to take this for a test drive.
05-25-2010 09:34 AM
Within the SDK download should be two zip files, CustomMenuPlugin.zip and ContactNameControl.zip, both contain .cs files that may be more along the lines of what your looking for. As a very broad, general rule, for any Act! development your going to require Act.Framework.dll, if your creating a plug-in you'll need Act.UI.dll and Act.UI.Core.dll. Add those as references and at that point if you are typing in VS and a using statement is required it'll let you know and add it for you.
Trying to be helpful,
05-25-2010 02:44 PM
05-25-2010 02:51 PM