Community
Showing results for 
Search instead for 
Do you mean 
Reply

Web Info access to TBL_CONTACT.CONTACTID

Tuned Listener
Posts: 9
Country: United States

Web Info access to TBL_CONTACT.CONTACTID

[ Edited ]
I would like to access a unique ID field associated with a contact record in Act 2010 for a Web Info URL parameter. The field in the database that contains this information is TBL_CONTACT.CONTACTID. Is there an Act field name that gives this value? I've tried {Contact.ID}, {Contact.CONTACTID}, and a few others but nothing gives the uniqueidentifier I need.
Message Edited by wilsotc on 05-05-2010 07:41 AM
Employee
Posts: 1,163
Country: USA

Re: Web Info access to TBL_CONTACT.CONTACTID

Sorry wilsotc, there isn't a field in act that contains the unique identifier for contacts. You could retrieve this same data via the OLE. Something like:

 

OleDbConnection ActOLE = new OleDbConnection(ActFwk.CurrentACTOLEDB2);

 

OleDbDataAdapter oleAdapt = new OleDbDataAdapter("SELECT CONTACTID FROM CONTACT", ActOLE); 

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 9
Country: United States

Re: Web Info access to TBL_CONTACT.CONTACTID

What I'm trying to do is to display a web interface referenced by the contact I have open in Act. If I can't access Act's own unique identifier, can I create my own? A unique integer than is incremented and generated when a new contact is created would work perfectly.

 

Thanks,

Employee
Posts: 1,163
Country: USA

Re: Web Info access to TBL_CONTACT.CONTACTID

[ Edited ]

Hmm.. since your developing a web interface you'd have access to the session mgr. I haven't taken a look at the results returned by this, but it looks like exactly what your looking for.

 

string id = session.CurrentContactID; 

 

Edit: Yes, I tested it and it does indeed return the contact ID for the current contact. Sorry for not thinking of this the first go round. 

Message Edited by mwood on 05-05-2010 09:01 AM
Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 9
Country: United States

Re: Web Info access to TBL_CONTACT.CONTACTID

Your example of a method to access these field values simply dumps the entire table's contactid field value. I need only one contactid for the contact currently displayed in the contact form. I will look more at the SDK if that's the only way this can be done. My ideal solution would be to do my own webinfo style panel where an instatiated copy of IE is supplied with the contactid of the contact *displayed*.

 

I am currently tasked with updating a company's Act system to the latest version. The company is using Act 4 because some employee long gone wrote several utilities used for the companies product licensing/authentication system directly to Act 4's DBF file. It turns out on inspection that even though this company has wanted to upgrade (and pay for) newer Act versions as they were released, they haven't done so because it required the utilities to be re-written as well. I'm trying to come up with a simple way to make it easy for them to keep their Act up to date, and as a result giving Sage a higher revenue stream. The Web Info tab would be a great facility for this if it were given access to a few more fields.

 

 

Employee
Posts: 1,163
Country: USA

Re: Web Info access to TBL_CONTACT.CONTACTID

It's also accessible without the web version

 

ContactList cl = afw.Contacts.GetContacts(null);

cl[0].ID;
 
 
Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 9
Country: United States

Re: Web Info access to TBL_CONTACT.CONTACTID

Thanks. I will take a look at this.
Tuned Listener
Posts: 9
Country: United States

Re: Web Info access to TBL_CONTACT.CONTACTID

[ Edited ]

I'm using the Act 2010 *Windows* system for my project.

 

The little research I've done so far would suggest that the plugin approach would be best. If it's possible to add a .NET standard control user interface onto an Act Windows Form, that will work. I've already seen this done somewhere on this forum though I've lost the link. The example I saw displayed a web interface on I think the opportunity form? It had two piles of $100 dollar bills.

 

I guess I'll take a look at the included plugin dlls, and the one I mentioned above to implement my project.

 

Thanks

Message Edited by wilsotc on 05-05-2010 03:25 PM
Nickel Elite Contributor
Posts: 937
Country: USA

Re: Web Info access to TBL_CONTACT.CONTACTID

[ Edited ]

That stack with hundred dollar bills actually uses the contact context web browser control (actually a derivative of it for opportunity entity) and I believe the content was delivered using Google UI.

 

This was a custom control that passed info from ACT! to a web control which displayed a neat visualization.

 

 I believe this is what you are looking for.

http://community.act.com/sage/board/message?board.id=ADN_Downloads&thread.id=229 

 

I see from your earlier post you were looking for the ContactID in the Web Info feature, as you've guessed this field is not exposed in the field collection.  The Contact context web browser control source code is available in the devnet downloads forum you can extend that code to return the Contact ID for use in your URL construction.

 

I'm interested to see how you'll use this control.

 

Regards, 

Message Edited by alduet on 05-06-2010 09:15 AM
Tuned Listener
Posts: 9
Country: United States

Re: Web Info access to TBL_CONTACT.CONTACTID

Thanks for all the help. I have downloaded the source code for the contact web browser control and have compiled it successfully. After compiling I get the warning: 'Act.Framework.ComponentModel.IContactListBoundControl' is obsolete: 'Please use IMutableEntityListBoundControl instead'. When placed on the form, it doesn't display the browser.

 

The opportunity control does work when placed on a form and I see that it uses the recommended IMutableEntityListBoundControl. Is there a newer version of the contact browser source code that uses the MutableEntity? If not I could try converting it myself using the opportunity control as an example.

 

Chris