Community
Showing results for 
Search instead for 
Do you mean 
Reply

Setting Access Level for new contacts

New Member
Posts: 3
Country: USA

Setting Access Level for new contacts

In an application that we've written, we are importing contacts from one system into ACT. I've seen the option to set the AccessType to be either private or public (default), but I've not seen an option of Limited Access. Is there any way to set it to be Limited Access and if there is, to select users/teams based on the individual that is importing the information?
It is a vs.net application importing into ACT! 2008 Premium.
Copper Contributor
Posts: 98
Country: United States

Re: Setting Access Level for new contacts

If I understand your question correctly you are looking for...
 
'Example 2
'This example sets a contact records accessor list to all accessors.

Dim cList As ContactList = ActFwk.Contacts.GetContacts(Nothing)
Dim cContact As Contact = cList(0)
Dim aAccessors() As Accessor = ActFwk.Contacts.GetAccessors()
ActFwk.Contacts.SetContactAccessors(cContact, aAccessors)
 
The trick here is that you need to setup the Accessors Array that you want to have access to that contact.
This example set that to everyone, which you'll need to limit.
 
C# example:
 
//Example 2
//This example sets a contact records accessor list to all accessors.

ContactList cList      = ActFwk.Contacts.GetContacts(null);
Contact     cContact   = cList[0];
Accessor[]  aAccessors = ActFwk.Contacts.GetAccessors();
ActFwk.Contacts.SetContactAccessors(cContact, aAccessors);
Carlton Jones
Sage Software
New Member
Posts: 3
Country: USA

Re: Setting Access Level for new contacts

That is what I was looking for. I had to do a little bit of other research relating to teams as well, but it works. Thank you.
Astute Commentator
Posts: 168
Country: United States

Re: Setting Access Level for new contacts

Thank you for the code on this. However, lots of it is missing.

 

For example, the statement: Dim aAccessors() As Accessor

 

What is Accessor? I've looked all over the SDK for this but I can't find it.

 

It would sooo NICE if this type of code would be properly posted without the developers shortcuts which make extricating the proper code soo much more time consuming.

 

Again, which library is Accessor defined?

 

Does anyone have a working piece of code on how to set a contact's Accessor list as well as the Team Access?

 

Thanx.

T

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Setting Access Level for new contacts

Dim cAccessor As Act.Framework.ActivityAccessors.ActivityAccessor

 

-- Jim 

Astute Commentator
Posts: 168
Country: United States

Re: Setting Access Level for new contacts

Jim,

 

Thank you. I ended up using Act.Framework.MutableEntities.Accessor and that worked for Contacts.

 

Do you know how to set the Contacts Accessors to be a Team? I've asked this question on this forum but the Swiftpage SDK support is ignoring it. Just a small piece of code would suffice.

 

            Dim guidTeam As System.Guid
            Dim tmAccessorTeam As Act.Framework.Teams.Team
            guidTeam = New System.Guid(strTeamGUid)
            Dim mTeam(0) As Act.Framework.Teams.Team

            tmAccessorTeam = ACTFM.Teams.GetTeam(guidTeam) ' this works.

 

Now, the only piece to set accessors to a contact that I've see is

              ACTFM.Contacts.SetAccessors(ACT_Contact_Record, MyAccessors)

I've tried to put the Team into the MyAccessors parameter but it rejects it. I've also looked at the Team object with not luck.

 

So, PLEASE, does anyone know how to do this?

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Setting Access Level for new contacts

Astute Commentator
Posts: 168
Country: United States

Re: Setting Access Level for new contacts

Yes, I did look at it. On the code, they define the accessors to be:

 

   Accessor[] teams = ACTFM.Groups.GetAccessors()

 

Which is generic and sincerely, just does not make sense to me. Why would anyone set limited access where everyone is part of the list. I just want to make, say, Team1 the accessor of the Contact.

Any code on this?

 

 

T