Notifications
Announcements
No record found.
Hi. I am trying to filter using a sales worker name in WorkerSalesTaker field in a query on SalesTable.
Applying the name directly to value (Julia Funderburk for example) does not work. I also tried the Recid for the worker but it does not filter it either. Is there a specific format I should use? Any support is welcome! Thanks!
Hi Vijay, I think RecId will not work and probably not good idea as RecId of this worker will be different in Different environments (Prod, Test, Dev). I'm not sure if there is a right format to add in AOT query range but you can manage it via code. You need to add the range where query is being used.
community.dynamics.com/.../modify-range-in-aot-query
Hi Vijay,
Do you need to set the current worker or random worker?
Thanks,
Girish S.
You can check this article for current user or employee associated with user. However, If you need to hard code the worker then it's best to add parameter in form, as worker's employment can be terminated and you have change the worker in AOT query or code level. Better to add parameter for worker if you want to show data related to that specific worker.
daxamigo.wordpress.com/.../
Hi Gireesh. I need to add it to a specific worker and I'll also be creating a separate role specific for that user. All I need to know is how to specify a worker in the query.
You cannot hard code worker RecId or name in the query range - RecId will be different in different environment and name will not accept as it is int 64 field. If the Personnel number is same in all the environments, you can add HcmWorker table to the query and add range to the personnel number.
If the personnel number also different, then you need to create a parameter table to save worker value and use that table in that query.
Ok that makes sense. Yes, the personnel number is common. I can add HcmWorker to the query but how do I link it to WorkerSalesTaker?
You have relation under SalesTable where SalesTable.WorkerSalesTaker == HcmWorker.RecId.
Hi. The SalesTable.WorkerSalesTaker returns a name while HcmWorker.Recid returns a number which is not relatable to SalesTable. I checked both the table records. I can only find SalesTable.WorkerSalesTaker==HcmWorker.Person to be common. But that does not seem to work for filtering salestable by specific worker.
SalesTable.WorkerSalesTaker returns a name because its a reference group field. But in SQL it will be save as RecId only.
Relation between SalesTable and HcmWorker will be SalesTable.WorkerSalesTaker == HcmWorker.RecId not Person.
Just add HcmWorker table under SalesTable Datasource in query - Add personnel number as a range and then specify the value for it.
Yes I already added HcmWorker as a datasource for the salestable. After specifying the personnel number as range and value, what value should I specify under SalesTable range for WorkerSalesTaker in the query?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional