Hi All,
I am trying to filter a list of CRM Tasks based on the related field of Tasks (i.e. whether the task is related to Opportunity, Accounts, Contact etc.). But I am unable to filter the record and getting an error which I don't know what I am doing wrong. If someone can help me with how to do this filter. Below snap for reference.
Error Message: "A binary operator with incompatible types was detected. Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'."
Can anyone help me please how to filter the record based on _regardingobjectid_type or is there any other way around that someone can suggest.
Thanks,
Waleed.
Solved! Go to Solution.
Hi @WaleedBinAfzal ,
As an alternative workaround, we could use Filter array to filter records.
You only need to configure state as a filter in Filter Query, then you use Filter array to filter records and use _regardingobjectid_type as a filter.
Image reference:
Besides, if you use Filter array to filter records, you may have difficulty in reference to the value of the field.
You could use Parse JSON to parse the body of the Filter array so that you could get the value of field easily.
I hope it helps.
Best Regards,
Proud to be a Flownaut!
Hi @Jcook ,
Thanks for this quicker.
I have already tried running the flow without filters on List Tasks. In this particular field which I am trying to filter it is containing just entity name which is opportunities in the above case in the image I posted. And that's what exactly I want to filter based on the type of the record. But it's not working.
When I am trying to run the flow without filters, the field _regardingobjectid_type is returning entity name which is opportunities in this particular case.
Hi @WaleedBinAfzal ,
I could reproduce the same issue on my side. When checking the body of the List records, we could find the value of _regardingobjectid_type is 'accounts', but we need to configure the _regardingobjectid_value in Filter Query to filter records. It is strange.
Image reference:
Best Regards,
Yeah, it is strange that we have to compare _regardingobjectid_type with _regardingobjectid_value but that's not fulfilling the purpose. _regardingobjectid_value is used to filter individual records not all the records of an entity. What I am trying to achieve here is to filter all the task records that are related to opportunities. But it seems there is no workaround for that, how can we filter all the task records related to opportunities. I am still unable to fix this issue.
Hi @WaleedBinAfzal ,
As an alternative workaround, we could use Filter array to filter records.
You only need to configure state as a filter in Filter Query, then you use Filter array to filter records and use _regardingobjectid_type as a filter.
Image reference:
Besides, if you use Filter array to filter records, you may have difficulty in reference to the value of the field.
You could use Parse JSON to parse the body of the Filter array so that you could get the value of field easily.
I hope it helps.
Best Regards,
Hi @WaleedBinAfzal ,
interestingly I have the same problem with using regardingobjectid_type to query record types and found this thread today.
When I am using your advice my flow test fails with the error message "Invalid type. Expected Object but got Array." when using the JSON parse. But I need an object to work with the filtered records.
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
136 | |
49 | |
42 | |
36 | |
28 |