Skip to main content
You can search for an interest and then set the interest to true or false. Here, we use a CRMScript.

Code

Walk-through

In SuperOffice, you can define an interest both with and without a heading (an interest can also exist under multiple headings). Each interest has its unique ID, which we in the example above used to set a specific interestId to true. It doesn’t matter if you move an interest to a different heading, as the unique ID stays consistent. First, we need to loop the NSSelectableMDOListItem[] we get back from the GetInterests() method:
In this array, we can put interests/items on the root, without a heading, or we can get an item for the heading, which then contains child items for the actual interests (nested). This code block checks the root:
Here, we get the child items for the item/heading and check each of the nested items:
We also need to SetChildItems back into the interestOrHeadings array.