Expand my Community achievements bar.

The Community Advisors application is now OPEN for the second class of 2024. Apply to become a part of this exclusive program!
SOLVED

API Call: Find out which objects a custom form is assigned to

Avatar

Level 10

Hello,

 

I wanted to write an API call to find out, to which objects (e.g. projects) a custom form / category is assigned / attached to.

As I do not find anything concerning that in the API-Explorer, I suggest, that I will need to use the EXISTS-operator of the unsupported API.

 

 

Besides that I do not really understand how the assignment is saved:

To my understanding the assignment is written to the field categoryID. If I add a custom form to a specific project, I do find its ID in the categoryID field, but if I add a second custom form, I still do only see the first attached form. So this field does not contain an array of all assigned forms.

 

 

Perhaps somebody can help.

Thanks in advance.

 

Regards

Lars

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

In a report you can see the custom forms attached to the object (and click them to edit) using this text mode: 

For any object with Custom Forms:

Edit Custom Forms in a pop-up window:

displayname=Click to Edit

linkedname=direct

namekey=category.name

textmode=true

tile.name=component.objectcategories

valuefield=customFormsNames

valueformat=HTML

viewalias=category.name

 

As you can see from the tile name the collection on an object is called objectCategories or OBJCAT and is a referenceable collection and not a string as we find in some objects.  While I haven't tested the API call for this it should be similar to referencing other collections.

 

You do need to search for the projects that have this in the objectCategories as there is no link from the custom forms to the projects, just the other direction.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

In a report you can see the custom forms attached to the object (and click them to edit) using this text mode: 

For any object with Custom Forms:

Edit Custom Forms in a pop-up window:

displayname=Click to Edit

linkedname=direct

namekey=category.name

textmode=true

tile.name=component.objectcategories

valuefield=customFormsNames

valueformat=HTML

viewalias=category.name

 

As you can see from the tile name the collection on an object is called objectCategories or OBJCAT and is a referenceable collection and not a string as we find in some objects.  While I haven't tested the API call for this it should be similar to referencing other collections.

 

You do need to search for the projects that have this in the objectCategories as there is no link from the custom forms to the projects, just the other direction.