Community
Showing results for 
Search instead for 
Do you mean 
Reply

Contact/Company/Group Accessors

Nickel Super Contributor
Posts: 441
Country: UK

Contact/Company/Group Accessors

I would like to get a user/team as an accessor for setting limited access to records.  Anyone have any ideas on how to do this?

 

Tom

Nickel Super Contributor
Posts: 441
Country: UK

Re: Contact/Company/Group Accessors

Found a samle from Carlton Jones in another thread....

 

'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

 

Tom