cancel
Showing results for 
Search instead for 
Did you mean: 

How to select managedStores from Employee type in Flexiblesearch

ccronquillo
Explorer
0 Kudos
301

I can see, via Backoffice, that an Employee record has the "managedStores" field (where you can assign base stores to it). However, when I query for the same in HAC / Flexiblesearch query, the columns that show up do not contain any managedStore field. Why is this the case, and how can I searcch for the same in HAC?

The context for this is because I want to be able to assign several stores to a particular user (of type Employee) via Impex. I am using Flexiblesearch as a starting point for this.

View Entire Topic
Lukasz_support
Associate
Associate
0 Kudos

Example that you are describing is that you want to list relation objects and in case of relations they are not persisted within the item type itself but there is separate table created for it which you would need to query in order to get results.

To identify what type you would need to query you might need to check Employee type in Backoffice:

1. Enter Backoffice>Types>Employee>Properties
2. Enter Properties tab
3. Search for property named managedStores and click triple dot button>Edit details
4. If property is RelationDescriptor then search for "Relation Type" field and doubleclick it.
5. Use its identifier to run flexible search.

Note: In order to get results associated with certain employee, identify source and target item types and modify query by including employee pk in "where" clause.