Notifications
Announcements
No record found.
Hi Experts,How to add a filter to show particular Item in ItemID field of SalesLine Datasource in SalesTable Form.I want the condition in lookup that- It will check the "ProductLifecycleStateId" field in "InventTable" Table. If It is not blank than will go inside to "EcoResProductLifecycleState " Form and check the field -"EngChgEcoResProductLifeCycleStateRule_StateRuleName" has value "Sales order" & if Field -"EngChgEcoResProductLifeCycleStateRule_Blocked" has value "Blocked". Than the Item ID field will not show that item in the lookup.How can I achieve this can anyone help.
Hi Harish, You can use override existing lookup method in ItemId field in SalesLine datasource in salesTable form. So, instead of standard lookup, your custom lookup should be called.
dynamics365musings.com/.../
Hi Harish,
You can create a view with the above-mentioned table with the values specified as a range and then add that view as Non exist join to the ItemId table in the lookup query.
Thanks,
Girish S.
Hello Mohit,
Thanks for the reply.
How can I add the logic in this lookup.
Thanks Girish
If I understood your requirement correctly, you don't want to show only those Item IDs which have Blocked status and StateRuleType is SalesOrder and value not empty in ProductLifecycleStateId field in InventTable. If Yes, then you can add ranges as per your requirement. If you want to show all items where ProductLifecycleStateId is empty and check these requirements only where it has some value then query will be different. Please confirm your requirement.
Yes I have the same requirement.
I don't want to show those Item IDs which have Blocked status and StateRuleType is SalesOrder.
I want to show all items where ProductLifecycleStateId is empty & if ProductLifecycleStateId is not empty so will check for non Blocked and display those Item.
In that case, you can refer to this article and add OR range to check either ProductLifecycleStateId is empty || using && operator check all other conditions.
www.linkedin.com/.../
You can create a view and add those ranges - use that view in a query. This will reduce coding.
Hi,
I have created a View but how can I use it in my code for lookup.
You can use this as how you use table in lookup 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 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader