Online - Our contact should only be editable for some users - anyone done this?

Hi!

We have a SuperOffice Online customer where they want to prevent normal users to edit Our Contact on the company card – or at least overwrite what they edit. Only given roles should be able to edit “Our Contact”. Is there anyone who have done this for others in Online before? How did you solve it? Script?

Thanks for your help!

Anne Lene

RE: Online - Our contact should only be editable for some users - anyone done this?

WRONG and sorry: This should be covered with the standard security setup.

Correct: Associates can see each other and ones she/he can edit the company card, they can change Our contact. ... will look deeper and will reply. 

 

Av: Boyan Yordanov 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

Hi!

By roles you mean? The problem is that they should be able to update address on the company card, but not Our Contact.. So setting the role to read/insert does not help me I'm afraid.

 

Anne Lene

Av: Anne Lene Solheim Lilleberg 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

Hi Anne Lene,

 

This question if have had onced in a while as well. Out of the box this (almost impossible). I am bot a CRMScript expert, but that's worth investigating of course. I do know that InfoBridge is working on DataDirector for Online though, that will definitly be the best solution in the near future. Maybe you can contact them and ask how far this development is.

Av: Henk Schepers 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

Hi Anne Lene.

It is possible using CRM-script using preferences and knowledge about the Sentry system. You can read more here

https://community.superoffice.com/en/content/content/client-sdk/setting-data-rights-with-sentry-and-userpreferences/

But it can only be achieved on person, group or system level :).

 

Av: Kasper Rosenlund 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

You could also use a Trigger for this. In the "Before Save Company" trigger do something like this:

#setLanguageLevel 3;

EventData ed = getEventData();

Integer newAssociateId = ed.getInputValue("ContactEntity.Associate.AssociateId").toInteger();
Integer contactId = ed.getInputValue("ContactEntity.ContactId").toInteger();

NSContactAgent contactAgent;
NSContact contact = contactAgent.GetContact(contactId);
if (contact.GetAssociateId() != newAssociateId)
  ed.setValidationMessage("Computer says 'no'.");

 

Av: Frode Lillerud 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

Thanks for the tip Frode!

 

Anne Lene

Av: Anne Lene Solheim Lilleberg 21. nov 2019

RE: Online - Our contact should only be editable for some users - anyone done this?

No script is necessary.

You can set a sentry preference to make editing the associate field read-only on existing contacts.

 

https://community.superoffice.com/en/technical/documentation/older-versions/documentation-7/admin/security/userpreference---adding-data-rights/sentry-preference-example/

 

You need to use the Rest API

Av: Christian Mogensen 21. nov 2019