Community
Showing results for 
Search instead for 
Do you mean 
Reply

Change company access from restricted to public

Copper Contributor
Posts: 26
Country: Switzerland

Change company access from restricted to public

I created a function that changes access on a company from to 'public':

 

Dim cl As CompanyList = ACTFWK.Companies.GetCompanies(Nothing)
For Each c As Company In cl
    c.AccessType = Act.Framework.MutableEntities.AccessType.Public
    c.Update()
Next

This code works well but, if access on a company ist set to 'restricted', to a team, the permission will not changed to 'public'. The function changes the access only to 'public' if the access was set to 'private'.

 

Please provide me a solution how to change restricted access to public, thanks.

 

 

Stefan Koehli
ACT! Cerified Consultant
KÖHLI INFORMATIK AG
Employee
Posts: 1,163
Country: USA

Re: Change company access from restricted to public

Hello Stefan,

 

The method you're looking for is ActFramework.Contacts.SetAcessorAllUsers(MutableEntity mutableEntity);

 

Something to also keep in mind is to make sure you're logged into the framework as a user with suffecient rights for the particular contact.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 26
Country: Switzerland

Re: Change company access from restricted to public

Hello Matthew, you made may day, thanks!

 

Stefan Koehli
ACT! Cerified Consultant
KÖHLI INFORMATIK AG