FuelSDK-CSharp icon indicating copy to clipboard operation
FuelSDK-CSharp copied to clipboard

[BUG] Category_ID not returned for GET on ETQueryDefinition objects.

Open barokzi opened this issue 4 years ago • 2 comments

Describe the bug When retrieving ETQueryDefinition properties via ETQueryDefinition.Get(), the results all have CategoryID = 0, despite including "CategoryID" in the Props property prior to call.

// not working code, just to illustrate situatioon
ETClient client = new ETClient() // id/secret properly set up and working;
ETQueryDefinition finder = new ETQueryDefinition
{
    Props = new[] { "Name", "CustomerKey", "CategoryID" }
};

GetReturn ret = finder.Get();
if (ret.Status)
  foreach(ETQueryDefinition q in ret.Results)
    Console.WriteLine(q.CategoryID)

Now I do not know if this is just me or for everyone else. I could not find anything on the web regarding this issue.

barokzi avatar Feb 26 '20 04:02 barokzi

@barokzi : I just opened a similar issue for ETQueryDefinition, as I did not see yours before (https://github.com/salesforce-marketingcloud/FuelSDK-CSharp/issues/95) The Get() and Post() seems to not be handling CategoryID Did you find a workaround by any chance ?

GDU-SF avatar May 20 '21 18:05 GDU-SF

@GDU-SF Unfortunately, no I did not have a work-around. My use was read-only however, so I did not have the issue with creating (in the wrong folder), so my "work-around" was knowing what the 'folder'/category-id ahead is. My application was more for browsing so I had the luxury of preloading the directory. I did implement a search function so what I did was the search each subfolder (starting from the "current/selected" folder) for the ETQueryDefinition object (based on text filters), and each subfolder of those and so forth. Time consuming for the user as well.

Having the Category_ID returned by the .Get() would have been the better solution.

On another note: I think this issue was my very first posting and did not know how to fill the fields - my apologies with the issue title. I might need to fix that, probably why it did not get any attention.

barokzi avatar May 21 '21 04:05 barokzi