Community
Showing results for 
Search instead for 
Do you mean 
Reply

Combine Contact table and Custom Contact table through C#.NET code.

New Member
Posts: 8
Country: USA

Combine Contact table and Custom Contact table through C#.NET code.

[ Edited ]

Hi-- Here is my issue:

We have to combine values in custom Contact values(eg: CUST_CONTACTTABLE1_1212) Core Contact table(TBL_CONTACT). We know that it's present in .ADF file( which is created after the Upgrade process).

We are using ACT SDK to connect to the ADF file(via PAD).

 Issue:

We have VisualStudio 2010 (which uses .Net 4.0). But when we try to use the ACt.Framework.dll then it's giving an error for target framework being wrong(We have Act2011 installed in our machine).

 

So any code snippet which has the Sage ACT connection via .net will be highly appreciated.

Also if there is a way to use the Sage ACT DLL's via .net 4.0(VS 2010) please let us know.

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Combine Contact table and Custom Contact table through C#.NET code.

Hi Mahesh,

 

If I understand correctly you are attempting to upgrade an ACT!6 -> ACT! 2011.

 

ACT!6 did not have Custom Sub Entities. With regards to other parts of the ACT!6 data, you would be better off accessign via the ACT!6 SDK rather than via the dbf since Histories etc are not contained within tables but within a singular BLB file.

 

Have I understood your query correctly?

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
New Member
Posts: 8
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Hi-- Here is my issue:

We have to combine values in custom Contact values(eg: CUST_CONTACTTABLE1_1212) Core Contact table(TBL_CONTACT). We know that it's present in .ADF file( which is created after the Upgrade process).

We are using ACT SDK to connect to the ADF file(via PAD).

 Issue:

We have VisualStudio 2010 (which uses .Net 4.0). But when we try to use the ACt.Framework.dll then it's giving an error for target framework being wrong(We have Act2011 installed in our machine).

 

So any code snippet which has the Sage ACT connection via .net will be highly appreciated.

Also if there is a way to use the Sage ACT DLL's via .net 4.0(VS 2010) please let us know.

Employee
Posts: 1,163
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Act and as a result it's API is currently using .Net 3.5. Next version we will be migrating to 4.0. From the table name that appears to be a spill over table which are created automatically. Is there some reason we need to move the values from the SOT to the main table? In either case the data should be accessible.

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 8
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

THanks for the update..
The reason for updating the Spill over table values to core contact table--> We are having a mapping tool and that cannot read the spill over table. It can read only the Core Contact table.
Do we have the next version currently available and if so where can I get it?
New Member
Posts: 8
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Hi ... I got the ACT 2011 premium dlls to build in Visual Studio 2010 by changing the target to .net 3.5 and making the application X86.

Now the issue is when I am trying to log (using ActFramework.LogOn() method) below mentioned error is thrown.

Error: {"Error in the application."} System.Exception {Act.Framework.ProductVersionMismatchException}

 

I found that the ACT 2011 premium is not opening up(When I am trying to Open the PAD file by double click) and is showing the error "For registering the applicaton call <<some number>>". Is the ProductVersionMismatchException, mentioned above, due to this? Or is it some thing other than that.

Note:

I added all the SDK reference from GAC

I found during the exception analysis that Applicaton Tier is shown as "BASIC"

ApplicationTier BASIC Act.Shared.Licensing.ProductTier

 

I am stuck right now and any help will be highly appretiated

New Member
Posts: 8
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Hi-- I am able to connect to ACT ADF file using the ACt framework I got all the contacts.

But I am not able to find the custom contact tables and the data in the actContact.

Following is the code.

string ActPadFile = @"<<.PAD file path>>";
ActFramework actFrmWrk = new ActFramework();
actFrmWrk.LogOn(ActPadFile, "<<Username>>", "");
ContactList actContact;
ContactManager cntctManager = actFrmWrk.Contacts;
actContact = cntctManager.GetContacts(null, false);   
for(int cntCount=0; cntCount < actContact.Count;cntCount++)
{
if (actContact[cntCount].ID.ToString().Equals("<<contactid>>"))
{
string ll = "First Phase done";
}
}

Is there any other method to get the Contacts along with their custom contact.

 

Employee
Posts: 34
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Custom tables have to be accessed via the CustomEntityDescriptor.  Here is some sample code:

 

CustomEntityDescriptor[] descriptor = framework.CustomEntities.GetCustomSubEntities(RecordType.Contact);

 

foreach (CustomEntityDescriptor d in descriptor)
{
CustomSubEntityManager<CustomSubEntity> manager = framework.CustomEntities.GetSubEntityManager<CustomSubEntity>(descriptor[0]);

FieldDescriptorCollection fdc = framework.Fields.GetFields(d);

CustomEntityFieldDescriptor[] cefd = manager.GetCustomEntityFieldDescriptors();
}

New Member
Posts: 8
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

I copied the code and tried executing. But the code is returning no values.

CustomEntityDescriptor[] descriptor = actFrmWrk.CustomEntities.GetCustomSubEntities(RecordType.Contact);

 

I checked in the database and found Custom contact tables.In fact I checked for all the record typea RecordType.Group, RecordType.Oppurtunity etc and none of them are returning any values.

If I go deep into the tables then I can see Cust_Contact tables

Employee
Posts: 34
Country: USA

Re: Combine Contact table and Custom Contact table through C#.NET code.

Before I posted it, I tried it on a customized database and got results back.  I wish I could help more, but that's all I know about custom field descriptors.