Is there a way to search for objects that are *missing* an association?

linkfuse
Contributor

We've tried searching associations.contact "NOT_HAS_PROPERTY", but it returns an error.

 

Are there any other ways to do this?

0 Upvotes
11 Replies 11
dennisedson
Community Manager

@linkfuse 

How are you structuring your body?

I sent this request and it seems to work:

{
    "filters": [
        {
            "propertyName": "associations.contact",
            "operator": "NOT_HAS_PROPERTY"
        }
    ]
}
Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
linkfuse
Contributor

Hmm... ours was part of a filterGroup. That must be the difference - we were searching for another known property as well, but we probably don't need to get that granular.

 

We'll try it again without the group.

 

Thanks!

0 Upvotes
RMones
Contributor | Platinum Partner

Hi @linkfuse and @dennisedson ,

 

with the current payload:

{
    "filters": [
        {
            "propertyName": "associations.contact",
            "operator": "NOT_HAS_PROPERTY"
        }
    ]
}

 

I've got also a 400 error.

{
"status": "error",
"message": "There was a problem with the request.",
"correlationId": "be038525-2741-4d36-8bef-ae151c4c820c"
}

 

You do also a POST request @dennisedson ?

Regards Ronald

dennisedson
Community Manager

@RMones 👀

This is a screenshot of my postman request (collapsed the results array)

Postman.png

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
RMones
Contributor | Platinum Partner

Hi @dennisedson ,

 

Yes your example is working. But when change deals to tickets or a custom object ID, I've got a 400 http error..

 

Regards,

 

Ronald

dennisedson
Community Manager

Wow. So I somehow found the only one that works!  What are the odds....

I do not have a good answer for this.  I will do some research to see if this is working as designed.

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
RMones
Contributor | Platinum Partner

Awesome! Thx 🙂

linkfuse
Contributor

It does seem to make sense as trying to get to contacts or tickets through workflows / the UI doesn't work either (we tried to set a property if the association was missing).

 

Contacts have associated deals as criterion, and tickets have associated companies, but not contacts as criterion.

0 Upvotes
linkfuse
Contributor

Hi! Were you able to determine if this is working as designed?

 

Thanks for your help!

0 Upvotes
dennisedson
Community Manager

Working on it!  Promise to drop the answer here when I find out!

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
linkfuse
Contributor

This is for tickets to contacts, specifically. Could that be the issue?

0 Upvotes