Search code examples
dynamics-crmmicrosoft-dynamics

D365 Pass Parameter into Search/Filter through URL


Is there a way to pass a parameter through the URL into a View to search against? For example, say I had a custom CheckID column. Could I manipulate the URL for a View to always set CheckID to 103, so that only the record with that matching ID under that particular column displays?

https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/set-field-values-using-parameters-passed-form?view=op-9-1

I was reviewing the above article and it seems similar to what I want - though I couldn't get this to work and it seems this article is only relevant to new record forms?


Solution

  • Unfortunately this is not possible. Custom query string parameters cannot be added to views and you cannot have custom logic (JavaScript) on views that could process such parameters.

    The way to go is to copy the existing view, modify its filter conditions and save it. The view is addressable, so it is possible to select it by code. See Query String Parameters for the Main.aspx Page - MS Docs.