Hi, how can I create a customized activity and get invoked by workflow. The requirement is to close incidents, there is a field on the form that once it is filled, it could be closed, so that user doesnt have to click revolve case button to close one by one.
close incident through workflow
Trying to hide sections on a form based on a field value
I am trying to show and hide sections on a form based on a field value (currency field type). This does not appear to be working and all sections always show regardless of field value. I have added this to the form properties for onload and onsave and on the amount requested field for onchange. The default for each section is visible. (I added the alerts to see if it was working but nothing is being shown in the alert either)
// JavaScript source code
//Show/hide approval sections on CER form based on Amount Requested Value
function showHideApprovalSections() {
//get field value
var AmountRequested = Xrm.Page.data.entity.attributes.get("msft_amountrequested").getValue();
{
if (AmountRequested < 1,000,000)
//hide sections based on value
{
Xrm.Page.ui.tabs.get("approvals").section.get("ceo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("cfo").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("coo").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("bgsrmgr").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("eng").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("facilitygm").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("srfinance").setVisible(true);
// Display an alert box
alert("AmountRequested");
}
else if (AmountRequested < 100,000)
{
Xrm.Page.ui.tabs.get("approvals").section.get("ceo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("cfo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("coo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("bgsrmgr").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("eng").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("facilitygm").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("srfinance").setVisible(true);
alert("Amount < $100K");
}
else if (AmountRequested < 15,000)
{
Xrm.Page.ui.tabs.get("approvals").section.get("ceo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("cfo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("coo").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("eng").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("bgsrmgr").setVisible(false);
Xrm.Page.ui.tabs.get("approvals").section.get("facilitygm").setVisible(true);
Xrm.Page.ui.tabs.get("approvals").section.get("srfinance").setVisible(true);
alert("Amount < $15K");
}
}
}
AppSource publishing error: Value cannot be null
Getting following error when pushing CRM package to Azure using Azure publishing:
[Failed] | [CertifyPesApplication]:[Failed] - Value cannot be null. Parameter name: filePath
Not sure what is causing it. Any suggestions appreciated.
CRM Online SQL Collation
Hi
Is there a default collation for the SQL database for CRM online? Is there any way to find it?
Thanks
Current Outlook email not tracked by Dynamics 365 App for Outlook
We are using Dynamics 365 (CRM) Online in conjunction with the Dynamics 365 App for Outlook within the Desktop version of Outlook.
In the majority of cases (not all) when I track a received email from within my Outlook Desktop inbox, to an Account, after about 15 seconds, the text "This is the most recent version, but you made changes to another copy. Click here to see the other versions." displays at the top of the email. When I leave the tracked email and return to it and then click the Dynamics 365 Icon (in order to start the Dynamics 365 addin) the addin does not recognise the email has been tracked. In order to view the tracked CRM item, I need to hit the text at the top of the Outlook email as described above. This opens in Outlook a copy of the email I tracked, when I hit the Dynamics 365 icon in this email, the tracked CRM record will display.
Does anyone know what is causing this behavior? Our users find this scenario very confusing. I expect that when an email is tracked to Dynamics 365 (CRM) that email (and not a copy) will be linked to the tracked CRM record. Thanks in advance for your help.
CRM Web API of removing a reference to an entity
I use both the below 2 requests to remove a reference to an entity, error message is returned. I don't know why it happens. Is there somone know why?
DELETE [Organization URI]/api/data/v8.2/accounts(87cb61ac-8723-e711-8104-5065f38b9141)/st_st_salesteam_account_PortfolioSalesTeam(d1c16b6c-6629-e711-810c-e0071b725541)/$ref HTTP/1.1
DELETE [Organization URI]/api/data/v8.2/accounts(87cb61ac-8723-e711-8104-5065f38b9141)/st_st_salesteam_account_PortfolioSalesTeam/$ref?$id=[Organization URI]/api/data/v8.2/st_salesteams(d1c16b6c-6629-e711-810c-e0071b725541) HTTP/1.1
Error Message------------------------
{
"error":{
"code":"","message":"The URI segment '$ref' is invalid after the segment 'st_st_salesteam_account_PortfolioSalesTeam(d1c16b6c-6629-e711-810c-e0071b725541)'.","innererror":{
"message":"The URI segment '$ref' is invalid after the segment 'st_st_salesteam_account_PortfolioSalesTeam(d1c16b6c-6629-e711-810c-e0071b725541)'.",
"type":"Microsoft.OData.Core.ODataException","stacktrace":"
at System.Web.OData.Routing.DefaultODataPathHandler.Parse(IEdmModel model, String serviceRoot, String odataPath, ODataUriResolverSetttings resolverSettings, Boolean enableUriTemplateParsing)\r\n
at System.Web.OData.Routing.DefaultODataPathHandler.Parse(IEdmModel model, String serviceRoot, String odataPath)\r\n
at Microsoft.Crm.Extensibility.OData.CrmODataPathHandler.Parse(IEdmModel model, String serviceRoot, String odataPath)"
}
}
}
Uregent Help needed. Oppening Opporuntites throws error
Hi Guys,
I hope someone can help me. I am using CRM Online and I have no idea why only opening opportunites I get below error. we have not changed anything and suddenly this error has started to pop up.
I am opening Opportunities in CRM and I get the following error.
The log file says below
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #3D5517F7Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>7f7abaa2-03b1-4658-b281-275295b6571c</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #3D5517F7</Message>
<Timestamp>2017-05-09T03:34:53.6596712Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>7f7abaa2-03b1-4658-b281-275295b6571c</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #70C337BA</Message>
<Timestamp>2017-05-09T03:34:53.6596712Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
Can we hide '+' button from sub-grid for a particular form, and not all forms. Is there a supported way?
Hello All,
I want to hide '+' button from my sub-grid on a form.
However I son't want to hide the same button from the sub-grid on some other form.
Is there a way we can do it using Ribbon work bench or anything else?
Regards.
There was an error with this fields customized event.
Hello All Experts,
Suddenly i am getting error message pop up when opening the custom entity form.
Error message speaks about "There was an error with this fields customized event."
and below are some details.
Field:Window
Event:onload
Error:undefined.
how to resolve this issue can anyone help me in resolving this.
regarding sending mail to group of users
hi i am facing some doubts regarding sending mail here is my scenario
when ever record created by an user i want to send an email to a group of of others users from the mail of the user who created the record can any one explain how we can configure in workflow.
2) is there any need of email router configuration to do this
thanks
Account Revenue Value not shown for some particular Accounts in an Opportunity View
We have a strange issue with CRM 2011 (and it is the same in our CRM 365 on-premise instalatoin, with migrated CRM 2011 org). When I create a simple view displaying all opportunities with status open, and I add the "Potential Customer" (which always is an account from CRM) Annual Revenue field as a column, this view shows that anual revenue, but it is missing for just a few opportunities. This account anual revenue field value is not displayingin the view for a few particular opps - always related to the same accounts in charge. When I click the account in charge (from the opp form) it opens a new window with the account details, and the annual revenue is there. In other words, annual revenue for some accounts, always the same ones, cannot be retreived into an opportunity view. While the value is there in an account view.
Any idea, why this happens?
kind regards,
Dieter Tontsch
mobileX AG
How to Accessing the Parent Form Xrm.Page in CRM latest versions.(window.top.opener.parent.Xrm.Page)
When writing scripts for CRM do not assume that the usage of window.parent, window.opener or this.parent will result in the same context across versions of the product as well as across client types
Need Help: not able to remove options from an option set field which is available in business process under second stage where as am able to remove the same filed options in first stage in CRM 2016
Hello Everyone,
Am facing a problem with Option set option removal which is located under business process flow.
here few things are the Option Set is presented on the form and also on Business process flow. I have written a function on onload that to remove few options on form as well as on Business Process.
Am able to remove options on the form and also on the first stage of the business process flow where as when i change to second stage the same option set field is available in second stage as well but now here am unable to remove the option that means am able to see all the options. Please help me how to remove the options in second stage as well. Thanks in Advance.
Here am providing the code for that. Below function is written on opportunity entity
function onLoad() {
Xrm.Page.getControl("salesstage").removeOption(3);
Xrm.Page.getControl("header_process_salesstage").removeOption(3);
}
Need to remove the same option in second stage as well. Below is the screen shot which is showing all the options in second stage. Here i want to remove the Close option value from the OptionSet.
CRM Report Authoring Extension 2016 cannot be installed on Windows 8.1
Hello,
I have tried installing CRM Report Authoring Extension 2016 on my laptop to create Fetch-XML reports based on records in CRM but, the tool cannot be installed.
First it tells me Live ID Sign-in assistant is not installed, then after it automatically installs it, it gives another error,
Business Intelligence Development Studio is not installed for Microsoft SQL Server Reporting Services
I'm sure I've installed VS2017 with SSDT because I have created sql-based report with it but cannot see Microsoft Dynamics CRM Fetch as datasource!
I would appreciate any clue.
Thanks a lot
Fetch Error JavaScript
Hi I want on filling the comment card lookup, fetch (get) fields from comment card to case:
Guest, Incident Type (from CC Type), and date of incident (from date of visit) .. But Its giving an error any help ?
// ----- Start Of Script : Fetch Guest, Incident type and date of incident from commentcard Fetch Area Code from Area function FetchCommentCard () { var CC= Xrm.Page.getAttribute("new_commentcard").getValue(); if (CC != null && CC != "") { var Guest; var IncidentType; var dateOfIncident; var serverUrl = Xrm.Page.context.getClientUrl(); if (serverUrl.match(/\/$/)) { serverUrl = serverUrl.substring(0, serverUrl.length - 1); } // To be updated as required var fetchXml = "<fetch mapping='logical' version='1.0'>" + "<entity name='new_commentcard'>" + "<attribute name='new_commentcardid'/>" + "<attribute name='new_cctype'/>" + "<attribute name='new_dateofvisit'/>" + "<filter>" + "<condition attribute='new_commentcard' operator='eq' value='" + CC[0].id + "'/>" + "</filter>" + "</entity>" + "</fetch>"; var xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +"<soapenv:Envelope xmlns:soapenv=\"schemas.xmlsoap.org/.../envelope\">" +"<soapenv:Body>" +"<RetrieveMultiple xmlns=\"schemas.microsoft.com/.../Services\" xmlns:i=\"www.w3.org/.../XMLSchema-instance\">" +"<query i:type=\"a:FetchExpression\" xmlns:a=\"schemas.microsoft.com/.../Contracts\">" +"<a:Query>" + fetchXml.replace(/\&/g, '&' + 'amp;').replace(/</g, '&' + 'lt;').replace(/>/g, '&' + 'gt;').replace(/\'/g, '&' + 'apos;').replace(/\"/g, '&' + 'quot;') + "</a:Query>" +"</query>" +"</RetrieveMultiple>" +"</soapenv:Body>" +"</soapenv:Envelope>"; var xmlHttpRequest; var doc; var result; if (window.XMLHttpRequest) { // code for IE7, IE8, IE9 , IE10 , Firefox, Chrome, Opera, Safari xmlHttpRequest = new XMLHttpRequest(); xmlHttpRequest.open("POST", serverUrl + "/XRMServices/2011/Organization.svc/web", false); xmlHttpRequest.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../RetrieveMultiple"); xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xmlHttpRequest.setRequestHeader("Content-Length", xml.length); xmlHttpRequest.send(xml); result = xmlHttpRequest.responseXML.xml; } else { // code for IE6, IE5 xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP"); xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("Content-Length", xml.length); xmlHttpRequest.send(xml); result = xmlHttpRequest.responseXML.xml; } if (window.DOMParser) { parser = new DOMParser(); doc = parser.parseFromString(xmlHttpRequest.responseText, "text/xml"); } // Internet Explorer else { doc = new ActiveXObject("MSXML2.DOMDocument"); doc.async = false; doc.loadXML(result); } if (navigator.userAgent.toLowerCase().indexOf("chrome") > - 1) { var vals = doc.getElementsByTagName("KeyValuePairOfstringanyType"); for (var j = 0; j < vals.length; j ++ ) { if(vals[j].getElementsByTagName("key")[0].firstChild.nodeValue == "new_commentcard") { CC = vals[j].getElementsByTagName("value")[0].textContent; Xrm.Page.getAttribute("new_commentcardid").setValue(CC); Xrm.Page.getAttribute("new_cctype").setValue(CC); Xrm.Page.getAttribute("new_dateofvisit").setValue(CC); } } } else { var vals = doc.getElementsByTagName("a:KeyValuePairOfstringanyType"); for (var j = 0; j < vals.length; j ++ ) { if(vals[j].getElementsByTagName("b:key")[0].firstChild.nodeValue == "new_commentcard") { CC = vals[j].getElementsByTagName("b:value")[0].textContent; Xrm.Page.getAttribute("new_cctype").setValue(CC); Xrm.Page.getAttribute("new_commentcardid").setValue(CC); Xrm.Page.getAttribute("new_cctype").setValue(CC); } } } } } // ----- End Of Script
on demand workflow
how to use on demand workflow can any one explain with scenario if there is any video pls suggest it will help
Process around maintaining Minified files on CRM
Hi Team,
On my current assignment, we have decided to minify all JavaScript files, so as for faster performance on the client side.
So, before deploying the JavaScript Library to Staging from Dev, we minify the JavaScript file manually (using jscompress.com) and then deploy the solution to Staging. And we then revert the JavaScript Library in Dev to the fully fledged original version, so as to enable easier debugging & readability in Dev for the other developers.
Please find below the current process, for working with a file name new_myFile.js:
1. Take the original version of new_myFile.js from TFS.
2. Ensure that Dev has the same version as in TFS.
3. Make changes to the file and test.
4. Now before deploying the version to Staging, we need to minify the file. So, upload TFS with the modified version of new_myFile.js
5. Minify the file and upload in Dev CRM
6. Create a new file named new_myFile.min.js in TFS to store the minified file.
7. Move the solution into Staging.
8. Come back to Dev and upload the original version of new_myFile.js (taken from TFS)
As seen above, this process does involve quite a few number of steps. Is there any easier way to maintain the original files in Dev and minified files in the higher environments.
Send Email using javascript in MS Dynamic CRM
How to send email using javascript in MS Dynamic CRM
Thanks in Advance
Accessing Microsoft CRM 365 Web API
I want to access the web api's of microsoft crm 365 online. I am following this link that provides a step-by-step guide to authenticate the web api through OAuth. For enabling OAuth I need to register an application so as to generate client id and client secret. Could you please guide me where should i register this application? The link mentions it to be done on azure active directory but doesn't sound to be appropriate.
Thanks!
Working Example for a Web API Rollup Function query
Hello
I try to get all related activities of an account by using the newly introduced rollup function of the Web API.
What I have until now is the following Query:
api/data/v8.2/Rollup(Target=@tid,Query=@query,RollupType=@type)?@tid={'@odata.id':'accounts(D0CE4071-A729-E711-A96C-000D3A2734EC)'}&@type=Microsoft.Dynamics.CRM.RollupType'Related'&@query=...
However, I cannot figure out how to provide a valid query parameter for retrieving the activities for the given account.
Has anyone a working example for using the Web API rollup function?
Thanks in advance
Best regards