we have custom HTML web resource to convert email to case , it is working fine in all the browsers, but in the outlook client we are not able to read the fields values from the HTML Web resource it is always returning null(window.parent.Xrm.Page.getAttribute("reardingobjectid")).
In Outlook client window.parent.Xrm.Page.getAttribute is always "null"
Retrieve the stored option set value and display in Web Resource
I have a Web resource which has a option set(1.Apple, 2.Orange, 3.Plum). When I select any of these options in Html web resource, I am able to save that in CRM option set field.
function fruitSelected(selected){
var selectedFruit = selected.options[selected.selectedIndex].text;
setOptionSetValue("fieldname", selectedFruit);
}
function setOptionSetValue(fieldname, selected) {
var options = Xrm.Page.getAttribute(fieldname).getOptions();
for (i = 0; i < options.length; i++) {
if (options[i].text == selected) {
Xrm.Page.getAttribute(fieldname).setValue(options[i].value);
}
}
}
At the same time I need to retrieve the saved option set from CRM and display it in Web resource, just to use it after refresh or save.
I tried
var attribute = Xrm.Page.getAttribute('new_customerseverity').getoption(value);
This is not helping me to get the saved option set value. Can someone help me in this
Moving old attachments to SharePiont
Hi I have recently set up SharePoint and Dynamics. However I would like to push all the attachments from emails to SharePoint as the that table is filling up our storage very quickly.
how to open CRM in Internet explorer on click of "View in Dynamics 365" button in outlook client 365.
is there any way to open CRM in internet explorer when user clicks on "View in Dynamics 365 button" in outlook client 365
Filter on Look Up for Price List items within Opportunity Product Lines
Hi
When a user is adding products on an opportunity, I would like to limit the options of the Price list items offered.
I have found multiple articles that talk about adding JS for that. That is fine but I am not sure where I should add it on this case, normally the examples are for Contacts and Account. Is it on the Opportunity Form? The Price Line item ? The Opportunity Line form is the one once you do double click so I don't think it should be?
Teresa
Odata Query not working for CRM Unified Interface but working in Classic UI
Hi All,
I am trying to load notes attachments in an IFRAME using Javascript. This seems to be working fine in the classic UI but I am not getting any response when using Unified App Interface.
Below is the code:
function GetRecordAttachments(recordId) {
recordId = recordId.replace('{', '');
recordId = recordId.replace('}', '');
var viewInBrowser = ["image/png", "text/plain", "application/pdf", "image/jpg", "image/jpeg", "image/bmp"];
var globalContext = Xrm.Utility.getGlobalContext();
var serverUrl = globalContext.getCurrentAppUrl();
var req = new XMLHttpRequest();
req.open("GET", serverUrl + "/api/data/v8.0/annotations?$select=annotationid,documentbody,filename,mimetype,subject&$filter=_objectid_value eq " + recordId + " and isdocument eq true", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");
req.onreadystatechange = function () {
alert("Inside Req");
if (this.readyState === 4) {
alert("Ready State:" + req.readyState);
req.onreadystatechange = null;
alert("Status:" + req.status);
if (this.status === 200) {
alert("this.response:" + req.response);
var results = JSON.parse(this.response);
alert("Results:" + results);
for (var i = 0; i < results.value.length; i++) {
var annotationid = results.value[i]["annotationid"];
var documentbody = results.value[i]["documentbody"];
var filename = results.value[i]["filename"];
var mimetype = results.value[i]["mimetype"];
var subject = results.value[i]["subject"];
alert("annotationid:" + annotationid);
alert("documentbody:" + documentbody);
alert("filename:" + filename);
alert("mimetype:" + mimetype);
alert("subject:" + subject);
var url = "data:" + mimetype + ";base64," + documentbody;
alert("url:" + url);
var id = "h" + i;
var Isview = false;
for (var j = 0; j < viewInBrowser.length; j++) {
if (viewInBrowser[j] == mimetype) {
Isview = true;
break;
}
}
alert(Isview);
if (Isview) {
Xrm.Page.ui.controls.get("IFRAME_itempreview").setSrc(url);
$("#IFRAME_itempreview").contents().find(".change-class").css('background-color', 'black');
}
}
}
else {
alert(this.statusText);
}
}
};
req.send();
}
Regards,
AKHIL
Custom Field for Activities that is Reportable
Hi,
I'm new to Dynamics, so learning my way. We are running CRM 2013 and we want to be able to capture the whole list of topics our sales team talk about with their clients.
Basically I want to be able to select multiple topics our team talk about with their clients, either through a series of customer check boxes added, yes or no type fields or however is best to achieve this and then report on them.
I'm finding it difficult to get to that third tier of reporting as I can draw a report on various activities conducted but not the level below with the list of topics covered.
We just have a team that can cover multiple products, items in one discussion and we want to capture that in the one activity.
Is this possible?
Please bear in mind I am not fluent in coding, just starting to learn so any solution if you could explain in depth would be great.
Upcoming date entry - recent date
Hi. This is my query:
We have a custom entity, IP Titles (Intellectual Property Titles). Each title (entry) has 10 - 30 due dates for filing for the lifetime of the title. I want a seperate field, called "Upcoming Due Date" that takes the recent upcoming due date of the 0-30 fields that have data.
Is there a way to do this without code? We have some javascript code running on other entities - and in these cases the business rules don't work where javascript exists. Since I have working business rules in the IP Titles entity, I'd rather do this without code.
Please advise. Our working process is that our IP Manager files out the due dates of the Title's lifetime in advance,and would like a seperate field that simply let's her know the upcoming date for that title.
THank you,.
Dynamics 365 tracking tokens
Hello All Experts,
I have enabled the tracking token in CRM using the system settings,
but when creating an email and sending it using the outlook , it's not working.
can anyone help me in this issue resolution.
Sitemap Area Icon error
Calculate Time Difference in DD:HH:MM Format
Hi All,
I want to calculate the time difference in Case Entity Form between "Created On" & "Resolved On".
How could i calculate the time difference in Days, Hours and minutes using JS?
Using multi factor authentication PluginRegistration Tool login, C # OrganizationServiceProxy Crm login Do not work
Chart: Second axis not rendered as expected
Hi,
I have a CRM chart, which uses two axis for combination and the chart is rendered as expected.
If I expose this chart in Portals, the second axis (= the 'count' axis) is not rendered as expected.
As per the attached screenshots, the second axis is 'flat' and not rendered as expected in Portals.
Unfortunatley, the documentation on the Portals chart functionalty is sparse.
Does anyone have mor insights and/or is there a way to investigate on the oberved rendering?
BTW: I am aware of the possibility to leverage a 3rd party charts library, but I want to squeeze out the standard as much as possible ;-)
Thanks in advance.
Content Snippets in Javascript
I have a requirement to show the Terms & Conditions on portal profile page.
So, I have been storing the T&C text in the contact field and showing that content in a modal.
Now, the requirement is to show the T&C based on the preferred language.
I thought of adding the T&C text in content snippets, but I don't have the faintest idea of how to display the content snippets in the javascript.
Can any of you suggest a way to achieve this? Is there any other way instead of:
1. storing the t&c text in a different entity with the language lookup and fetching that information using odata and displaying it in the modal
2. if I were to use content snippets, how would i use them in the script?
Related Entity Does Not Contain Data not available in Views?
Hi All,
I was very happy when MS introduced the availability of searching within an Advanced Find where a 'Related Entity Does Not Contain Data' - it's something we'd been needing for ages.
Today I thought I'd take one of those advanced finds and make a corresponding system view for it - only to discover that it's not possible from the UI to add the 'does not contain data' part into the related entity. Is there some special reason for this or is it an oversight? Seems crazy to me to add such a useful feature but then disallow it in system views - looks like a job half done!
Email outlook to Dynamics crm 365 online synchronization
Hi,
I am trying to Synchronize the incoming emails in outlook with crm 365.
I am using the option SMPT for Email Server profile. But I cant sync an incoming email to crm.I am also trying to use Exchange server instead of SMPT.But unfortunately it dosent Sync.
Can someone please explain steps to sync to incoming email.
Thanks,
Hajira
Sitemap error stopping users logging in
Hi, Some of our users are being locked out due to the following error message (If you are the administrator, you can go to the solutions page and import a different solution.
You do not have permissions to these records or something may be wrong with the sitemap. Contact your Dynamics 365 administrator. If you are the administrator you can go to the solutions page and import a different solution.)
I haven't edited the site map in 6 months!
Any help would be gratefully received.
Thanks, Glen
Communication feature on Portal
I have an issue, where i need to provide a possibility for MS Portal Users to communicate with each other. It should be with customizible security, so the Portal user can see only his or his Company collegues's(standard Contact->Account relationship) messages. Is there any way we can do it with any O365 App? Or some other way if possible?
React Application with Active Directory plugin CORS issue
Hi all,
I am trying to make a Reactjs application which uses Active Directory plugin (ADAL) to perform the OAuth2 authentication back in Dynamics 365.
This seems to be working well, but I get CORS error when trying to fetch Dynamics CRM data.
According to Microsoft documentation, ADAL plugin takes care of CORS stuff on fetch requests but still I am getting errors related to CORS.
This is my adalConfig.js code:
import { AuthenticationContext, adalFetch, withAdalLogin } from 'react-adal';
export const adalConfig = {
tenant: '<tenant id from AD>',
clientId: '<Application id>',
endpoints: {
api: '<Application id>'
},
cacheLocation: 'localStorage',
};
export const authContext = new AuthenticationContext(adalConfig);
export const adalApiFetch = (fetch, url, options) => adalFetch(authContext, adalConfig.endpoints.api, fetch, url, options);
export const withAdalLoginApi = withAdalLogin(authContext, adalConfig.endpoints.api);
And this is my fetch request:
let result;
const options = {
method: 'GET'
};
adalApiFetch(fetch, 'https://<myorganization>.crm2.dynamics.com/api/data/v9.1/leads', options)
.then(response =>{
console.log(response);
})
.catch(error => console.error('SERVER ERROR:', error));
Any ideas of what's wrong?
SSRS report parameter to set according to date range
Hello Experts
I Have a parameter which is date type and another parameter drop down option set which has options "1st half" and "2nd Half"
my requirement is
if the date range is april to october than "1st half" parameter option should select
if the date range is november to april than "2nd Half" parameter option should select
Please help thank you


