passing parameters to a view ms crm 2011 - dynamics-crm

I've custom view on account entity and I want to pass parameters dynamically to that view. When I try to pass parameters as below i got an error. Is there any best way to pass parameter to a view like individual records.
[http://mycrm/myorg/main.aspx?etc=1&extraqs=address1_postalcode%3DCB4&pagetype=entitylist&viewid=%7b12EC908C-44CB-E111-911F-F04DA2F5F23E%7d&viewtype=4230]
any suggestions
Kiran

I think that passing dynamically parameters to view is not possible. In this situation you can use advanced find, filters, or create report.

We have a similar requirement: We have a ribbon button, click the button popup a silverlight page, this is a search screen, you can input the search criteria and click search button on that page. The search result will be returned to CRM Home page.(Not the advanced find, it returns the results to CRM home page).
Actually, what we have to do is create the QueryExpression from silverlight, and then convert it to fetch xml query, use this fetch xml query to create a custom view, attach the custom view to home page.

Related

Automatic display of records in Dynamics

So i am trying to retrieve records from the database when an info is typed into a field e.g Sprint is entered into "Company name" field , how can i capture the contents of that field, retrieve it's records from the database and use it to fill the remaining parts of the form.
This is my first time using dynamics CRM, would like it if someone can help me out or point me in the right direction.
Dynamics crm has provided on change event of a field here
Attribute OnChange Event (Client API reference) you can find info about it.
How to write client side scripting in Dynmaics crm
Steps I would perform:
Add onchange event for field on which you want it to fire.
Then I would add javascript for the onchange of field
In that Javascript I will use Dynamics crm Webapi to retrieve data from Account Xrm.WebApi (Client API reference)
Once I get the data I would set that in those field where needed on from setValue (Client API reference)
You will find numerous example of how to create a Javascript for Dynamics CRM
CRM also has what is known as a Quick View Card which can retrieve values from the source record (for display only).
For example, when you select "Sprint" as the Company Name, you can use a Quick View Card to display information about the "Sprint" account record.
Here's the MSDN Link
A quick view control on a custom business app form displays data from a record that is selected in a lookup on the form. The data displayed in the control is defined using a quick view form. The data displayed is not editable, but when the primary field is included in the quick view form, it becomes a link to open the related record
This is a code-free alternative to the answer described below, so the advantage is that it is easier to maintain. The data is also "live" meaning that if you update a phone number on the "Sprint" account the update will appear on all quick view forms (after a refresh)
The disadvantage is that this is not a copy of the data, so may be a problem for future reporting. If you need a point-in-time capture of the data, this can also be a problem.

Can a dynamic link be created to be used from a view in Dynamics CRM?

I would like to be able to include a link in a view on the contact entity of dynamics crm that will pop a custom window that we have built. The custom window needs the contact id and the user id in order to function. Our users have requested that such a link be on the view rather than having to go into the contact record itself.
So, is it possible to create a dynamic URL that will be utilized from the view and will be able to determine the contact id and the user id?
I would assume I need to do this with a web resource, but I've only ever used a web resource in an iframe.
I have tried to build a web resource and just use the web resource's link to put into a field and display that field on the view, but obviously that didn't work.
Essentially the link would build a url and then pop up a new window with that url. Here's my url structure: https://example.com/mscrm/ticketing/Activity/PhoneCallSave.aspx?cId=00000000-0000-0000-0000-000000000000&id=%7b00000000-0000-0000-0000-000000000000%7d&orgname=00000000-0000-0000-0000-000000000000&userid=%7b00000000-0000-0000-0000-000000000000%7d&type=contact&token=Zf7Hi3PFokqRn3RnTD6hPA
This is an interesting request that I have not encountered before...
I thought about using a URL-formatted field, and the fact that D365 by default will hyperlink lookup fields. But, with those options you'd have to write data into a field on each Contact or create an entire new record for each Contact, on the fly.
What about creating a separate web resource that contains a table with only one column to hold the dynamically generated URL's? Run the same query as the view to get the Contacts, then generate the URL's and populate them into that "mini-grid". Put the main Contacts view in one section (say two-columns wide), and the mini-grid web resource in a single-column section right next to it, with no border and the same row height.
This way you rely on the main Contact grid for the Contact info, with the mini-grid holding your dynamic URL's (with proper link names of course, rather than raw URL's).
The high-level steps would be:
Get the user's id from the form context.
OnLoad of the sub-grid, get the set of Contact Id's.
Generate the URL for each Contact.
Populate the URL's into the mini-grid in the same order as the Contacts in the sub-grid, so each row in the mini-grid lines up with its Contact row to the left.
Another idea would be to look into the custom icon functionality in V9 to see if there are any hooks in there where you can add a dynamic URL.
You could also write a RetrieveMultiple plugin to dynamically populate a URL-formatted text field. RetrieveMultiple plugins have their caveats. But, how bad is it?
An unsupported option might be to hack the DOM and put your dynamic URL into a blank URL-formatted field in the view.

Dashboard Hyperlink or Iframe URL: Filter Parameter Required

I have a dashboard made up of several dashlets (based on ad hoc views) and some filters.
I have set up a hyperlink on one dashlet that allows the user to click on a product and drill to another report.
The hyperlink needed to pass the Product in the Dashlet that the user clicks on as well as any selections made on the filters within the dashboard, for example filter the dashboard on certain Supplier Types.
I got this working using the following syntax: -
repo:/reportPath?$P{"p_SupplierType=",Supplier_Type_Filter , ? "&"}&p_Product=$P{Product Field}
This works fine.
THE PROBLEM
The issue is that if I don't select anything in my Supplier Type filter (i.e I want all Supplier Types) then I get an error telling me that Value for parameter 'Supplier_Type_Filter' is not set.
Anybody had the same or similar issues and have a solution or a workaround or even just an idea?
Thanks in advance.

Dynamics 365: Change the default view to a custom search

Is there a way to change the default list page when you click on a entity form to a custom search page? Something like google ( a text box with a search button) to return the results of the list base on the search criteria?
for example,
from this:
to a search page.
Sorry you can't. This page is not customizable. But the dashboards are. You can make a custom dashbard with a single iframe and it can be your default page.
Yes you cannot modify the design of this list page. Dashboard & custom html webresource/iframe is fine.
But I recommend you to customize this list page itself to look like what you want, atleast close to similar CRM UX. First deactivate all the views for that particular entity except Active & Quick find. Rename the system view “Active Details” into “Search” & modify the filter condition to include something like createdon = tomorrow. Hence the grid will be empty, you got search box on right to start with. When user search, Quick find view resultset will be rendered in grid.

Edit Filter Criteria Option not displayed for View

Why is the Edit Filter Criteria Option not getting displayed for the following view?
As you can see above there is no option for updating the filter criteria of this view named Account BulkOperation View, while for other views it gets displayed. I am not exactly sure why this is happening or if I am missing something.
Once this happened to me when the view query is customized to an extent with custom fetchxml. Check the background of this view using XrmToolbox FetchXML builder or View designer. Some broken query fields will be there.
The view is displayed with column layout and possibilities to define sorting and add new columns etc. But there is no link to "Edit Filter Criteria" as there usually is. This is because CRM actually realizes that this view is beyond its design capabilities, and only lets you alter the view in ways CRM knows CRM can handle.
Read more.

Resources