Dynamics CRM - Custom development - dynamics-crm

I'm completely new to the Dynamics CRM environment.
Within our current implementation, there is a grid which displays a list of current sales opportunities. Within this grid, there is a column for the user which is a link to another part of Dynamics. We want to instead be able to open a new window to another system. How can I customize how that link gets rendered out so that the client "onclick" function can link to a javascript function which will open a new window with the URL we need?
Please see attached:
Snapshot of Dynamics grid

Im afraid that this is not possible with supported customization.
My understanding is that you will keep URL to external system on entity and you would like to be able to open with single click from grid displaying this record?
However, Im not sure if you add this fields as single line of text with format option URL won`t work as expected. If this does not work, you would need a custom grid to display this data.

You can store url in text field with format URL, click on such field will open link in new window/tab.

Related

CRM 2013 Onprem: logged in users accessed area in CRM

We want to check what areas are used by user when they login to CRM. I have tried the recentlyvieweditems.
Is there any other way we can achieve this.
I do not think there is any solution or way to find out what area are clicked unless you login as that user and check what that user clicked.
The closest you can reach to get some insight for users and which entites they are accessing.
Organization insight solution
You have to capture those user telemetry data like - pages navigated, opened entity records, clicked ribbon buttons, etc using Application Insights or your own Database through your own API for all the breadcrumbs.
There is no other native solution other than Org Insights, that too available from 2016 onwards IIRC. Later they took different diversions during CRM online version upgrades.
You may try the EnableRule of application level command bar button to run your custom JS code to log user navigation. I haven't used it ever, but this is what I would try in your given scenario and I don't see any reason if it wouldn't work.
Create new custom entity/table with User ID/Name and URL attributes/columns
Create a application level command bar button
How do I add a global button (for all entities) on the CRM 2013 Command Bar
In button's enable rule, Add user id/name and document.location.href values as a new record to the custom table.
Create entity record through Javascript , CRM 2013 , SDK.Rest.CreateRecord
Don't forget to return false from the code in 'enable rule' so that the button should not actually be shown anywhere in the application.

Microsoft USD - Open different entities in a different tab

I have a Phonecall hosted control opened inside unified service desk as one of the tab and i have a few grids on that page.
On click of any grid inside my phone call page the respective entity is displayed on the same page.
Like for example if I click on customer product grid entity then that grid is opened similarly, there are other grids on which the user can click and it will load that entity on the same tab.
Now, the issue is as i said earlier that my new entity is being loaded on the same hosted control that is my phone call page. I want to prevent this from happening.
I want to display a different tab for whatever record is clicked within my PhoneCall Hosted control so this way my Phone Call Page is still there.
I know i can do this using Windows Navigation Rule but I will have to create different navigation rules for my different entities and then in future if any other grid is added in my phone call page then i will need to add another navigation rule to cater it. This is not the best approach, I want it to be dynamic. Is there any other way where I can open a different tab if a record is clicked from my phonecall page?
Create a new windows navigation rule. The "From" field should be your Phone Call Page. Leave the Entity, From search, and URL fields in the "Route Logic" section blank. Windows Nav Rules get executed in order, and once they find a match it stops executing. So make the order low enough so that it gets executed where you want it to.
The "Target Tab" and "Show Tab" fields should be a new hosted control that you want the popup to open in. The action is "Route Window".
As far as route type, you are going to have to play with this a bit. I think opening stuff from a subgrid is Route Type "Popup", but you might need to create 2 very similar rules (one with route type "popup" and the other with route type "in place") to account for all scenarios.
See the example screenshot below:

Dynamics CRM 365 seems to ignore default values for entity fields in quick create forms

For the contact entity I have set the default values for some build in fields to specific values. For example I set the default value for the field "Contact -> donotemail" to the value "Do not Allow".
In the "normal" web browser forms it seems to be working as expected.
But if I create a new contact using a quick create form and select the save and then "view created record" button the view switches to the new created contact.
If I then scroll down to the "donotemail" - field the field does not have the default value I selected in the field settings.
I googled the problem, the nearest community post I could find is
https://community.dynamics.com/crm/b/mohamedmostafacrmblog/archive/2016/06/02/set-field-default-value-in-microsoft-dynamics-crm-online-and-on-premise-using-business-rules-without-javascript-or-custom-components-plugins-or-workflows
Unfortunately the post is from 2016 and it describes how to workaround the problem using custom business rules. But due to this is build in funtionality there is no business rule I could edit and creating some new to achive the goal of setting a default value seems odd.
Did someone encounter this problem too and could find a solution?
One possible reason I could think of: you might have not refreshed the main window after publish all, maybe cached QC form didn’t work as expected bcoz “customize the system” will open a separate popup to edit & publish all.
Still technically server side should not be cached with old customizations. But QC might have rendered from cached Metadata in browser.
But publish all should reflect immediately & no delays expected. Make sure to refresh the main window next time :)

Create ribbon button Dynamically in CRM 2011

Can any one help me to create a ribbon button dynamically in CRM 2011. The scenario is, when we create a record, one ribbon button has to be created dynamically based the optionset value selected in that record. Can we get it work using JScript or Plug-in or Workflow? Enable or Display rules are not useful here and should not touch XML code.
Quick principle: Ribbon Buttons are not a part the record, they are a part of the UI. You can make the UI change based on the record you are looking. Therefore you cannot 'add' a button to a record. You can add a button to an entity form.
Plugins definetly wont work here, they peform logic on the 'back-end'. JavaScript might work but I would expect this to be quite awkward. What you should do is edit the ribbon Xml. Now there is an excellent for editing the ribbon: Ribbon Workbench, this tool make it significantly easier to
edit the ribbon (this is editing the XML but this is the way its meant to be done).
Then I think you will need to
Create a ribbon button for each action.
Then follow this tutorial to enable and disable them: Enable/Disable a ribbon button dynamically based on a form value.
Using a display rule would be the right way to do this.
Create multiple buttons and set their display rule when selected option is equal
to the button's name.
We can get it done by two ways-
Through plug-in:(Note: It won't works in Sandbox mode and consume some time.)
Create one solution and add specified entity to it. Go through the source code here
Export this solution to Temp folder and unzip it.
Edit customizations.xml file to add our own RibbondiffXml tag.
Zip all the XML files and Import it to CRM.
Publish the Customization.
Through XML edit:
Export Application Ribbon, update XML to add button and replace entity name with {!EntityLogicalName} in all the places.
Ex: <CustomAction Id="New.{!EntityLogicalName}.MyButton.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Management.Controls._children" Sequence="70">...
Add EnableRule to enable this button only if Config record exist for current entity.
<EnableRule Id="New.{!EntityLogicalName}.MyButton.Check">
<CustomRule FunctionName="checkConfigRecord" Library="$webresource:new_/Scripts/ValidateConfigRecords.js">
<CrmParameter Value="SelectedEntityTypeName" />
</CustomRule>
</EnableRule>
Create one JavaScript library with name new_/Scripts/ValidateConfigRecords.js which contains function checkConfigRecord which counts config records exists for particular entity. If count is greater than 1 return true. Otherwise false.
Import the ApplicationRibbon Zipped file
I ran into the same problem on Dynamics 365 and found a solution.
RibbonWorkbench includes a feature called "Fly Out Anchor Buttons"
This includes a property called PopulateQueryCommand.
You can use this command to dynamically (using JScript) add menu options to the Anchor Buttons at runtime.
The RibbonWorkbench documentation includes all the information you need to use this feature.

CRM 2011 - New Appointment from Case defaults Required Attendees to Account

When I create a new appointment from the context of a saved incident it defaults the "Required Attendees" field to the incident's account. I want it to default to blank or the current user. (To create the appointment I used the navigation pane on the incident to view related activities then use the ribbon button add new activity.)
Where can I control that behaviour?
I tried looking at the entity mappings but it appears there isn't a "mappable" relationship for the "RequiredAttendees" field. (I checked as per the instructions here: http://rc.crm.dynamics.com/rc/2011/en-us/on-prem/5.0/help/ui_cust_Mapping.htm) Have I missed something or is this a hardcoded CRM-ism?
Going forward do I have any options to modify this? I suppose I could do javascript on form load but I'd prefer this be configurable inside CRM without touching javascript.
I think that best solution is to use onLoad javascript. Just check that Appointment is created from Incident form. (In Url - Type=112)
You can rewrite ribbon button on Incident form to open new window with URL
http://myCRM/myOrg/main.aspx?etc=4201&extraqs=%3fcontactInfo%3d%26etc%3d4201%26pId%3d%257bB8C55089-26D7-E111-93D4-005056986118%257d%26pName%3dCaseName%26pType%3d112%26pagemode%3diframe%26preloadcache%3d1346939630259&pagetype=entityrecord
So just exclude:
partyaddressused%3d%26
partyid%3d%257bA9D02C74-26D7-E111-93D4-05056986118%257d%26partyname%3dAdministrator%2540crm.local%26
partytype%3d2%26
This part of url contains data related to activity party ('required' field).

Resources