Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all 46379 articles
Browse latest View live

Merge columns in view

$
0
0

Hello! 

I'd like to merge columns in a view. Here's the reason: I've 4 entities in my veterinary CRM: appointment, pet, dog and cat. Appointment contains a date, a client and a pet. I'd like in my view to display the name of the pet. The only solution I found was to create 2 columns for this. One with the cat's name and the other with the dog's name. So when the pet is a cat, the column 1 will display his name and the 2nd will be empty.

But this isn't a correct solution because in reality there's 20 species of pets! So I always have 19 empty columns. So what I would like to do is either don't display a column if it's empty or to merge the 20 columns in one.

I hope I was clear :) Thanks for reading this! 


CRM 2015 Javascript optimizations

$
0
0

Hi,

I have a huge Javascript for Account form which I am analysing and optimizing because Account form take around 11 secs to load due to this file. There is one particular logic that alone takes several seconds, it validates specific fileds, Shows alerts in specific language based on optionsets and then try to submit data to SAP in sync mode whilc showing Progress (based on spin.js). All this is loaded at "onload" but triggered via ribbon button. I would like to move this logic out of JavaScript as much as possible i.e. to plugins, Workflows, possibly external app like asp.net called from ribbon button so that Javascript gets smaller and simpler. Users insist on having the same functionalities. The requirements are:

1. Validate fields required for SAP sync.

2. Show alerts in user/ local crm language.

3. Submits data to SAP and user gets confirmation.

How can it be redeveloped so that Account form loads faster? Thanks in advance!

Case view created on between 25 days and 29 days fetch xml

$
0
0

Hi Friends,

I want do fetch xml view cases are created on between 25days and 29days case created on.

Thanks

How to reopen a Won/Lost Opportunity using the Web API

$
0
0

By reading the docs I have come across the WinOpportunity and LostOpportunity message that I can POST.

For example to Win my opportunity I can POST thusly:

url:  myorg.crm.dynamics.com/.../WinOpportunity

body:

{
  "Status": 3,"OpportunityClose": {"subject": "Won Opportunity","opportunityid@odata.bind": "/opportunities(7b57eae2-0401-e711-8104-5065f38b4251)"
  }
}


headers:

  Authorization:  Bearer <access_token>
  Content-Type: application/json; charset=utf-8
  Accept: application/json; charset=utf-8
  OData-MaxVersion:  4.0
  OData-Version: 4.0


---------------------
And it all works with a 204 http status response. So far so good.

Similarly I can close as lost an open oportunity with a LoseOpportunity request and using a status code of 4.

What can one do to REOPEN an opportunity that is not in open state?
I have been scouring the docs and don't see how to do this.

Any help is greatly appreciated.
Thanks in advance.

Dynamics CRM 365 - Business Process Flow

$
0
0

The Business Process Flow editor has changed for Dynamcics CRM 365.

I am trying to make a copy of the standard Opportunity Business Process Flow. I have added it to a custom solition, and then pressed 'Save as' on the BPF. The resulting copy has a prefix of 'new_', not the prefix for the solution. I feel this is a bug, but there does not seem to be a channel to report these.

Javascript not Trigerring on change event in my Lookup

$
0
0

I  have two entity,one of my entity triggered my java script, the other entity doesn't trigger it. They have both same fields(same name). I insert the js code in the on change event of lookup field(both). I already checked the name but they both the same. So I try to erase some code to test if an error message will occur but nothing happen.Do you think what is the problem?

here is my code it's working fine in the other entity

function makeRequest(method, url) {
    return new Promise(function (resolve, reject) {
        var xhr = new XMLHttpRequest();
        xhr.open(method, url);
        xhr.setRequestHeader("OData-MaxVersion", "4.0");
        xhr.setRequestHeader("OData-Version", "4.0");
        xhr.setRequestHeader("Accept", "application/json");
        xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        xhr.onload = function () {
            if (this.status >= 200 && this.status < 300) {

                resolve(xhr.response);
            } else {
                reject({
                    status: this.status,
                    statusText: xhr.statusText
                });
            }
        };
        xhr.onerror = function () {
            reject({
                status: this.status,
                statusText: xhr.statusText
            });
        };
        xhr.send();
    });
}
function setExpenseCategorybasedonVendor() {
	if(Xrm.Page.getAttribute("cse_vendor_name") && Xrm.Page.getAttribute("cse_vendor_name").getValue()){
    var lookup1 = Xrm.Page.getAttribute("cse_vendor_name").getValue()[0].id;
    var clientUrl = Xrm.Page.context.getClientUrl();
    var query = clientUrl + "/api/data/v8.0/cse_vendormasters(" + lookup1.slice(1, -1) + ")?$select=_cse_expense_category_value";
    makeRequest('GET', query)
    .then(function (res) {
    var res2 = JSON.parse(res);
    var guid = res2._cse_expense_category_value;
    var query2 = clientUrl + "/api/data/v8.0/cse_expensemasters(" + guid + ")?$select=cse_name,cse_expensemasterid";
    makeRequest('GET', query2)
    .then(function (response) {
    var res3 = JSON.parse(response);
    var value = new Array();
    value[0] = new Object();
    value[0].id = res3.cse_expensemasterid;
    value[0].name = res3.cse_name;
    value[0].entityType = "cse_expensemasters";


if (lookup1 != null){

    Xrm.Page.getAttribute("cse_expense_category").setValue(value);
    Xrm.Page.getControl("cse_expense_category").setFocus();
    Xrm.Page.getControl("cse_amount").setFocus();

    }

else{
   Xrm.Page.getAttribute("cse_expense_category").setValue(null);
   Xrm.Page.getElementById("cse_expense_category").clear();

}

    })
    .catch(function (err) {
    console.error('there was an error!', err.statusText);
    });
    })
    .catch(function (err) {
    console.error(' there was an error!', err.statusText);
    });
	}
    }


Create a Sharepoint subfolder in Sharepoint Online for the record created from CRM Online.

$
0
0

Hi.

I am trying to create a sharePoint subfolder in sharepoint from the record created in CRM Online. At the moment, my code is able to create a document location in CRM but I am final aim to create a sharepoint subfolder inside the folder that is manually created from CRM.
Is there a specific method or code inorder to achieve this? I have followed sample code from http://develop1.net/public/post/SharePoint-Integration-Reloaded-e28093-Part-3.aspx which is very helpful but unable to crack the final goal that i am looking for. 

Someone with really good understanding of CRM Online and sharepoint Online integration would be of great help. Eagerly waiting for your reply.

Note: Using CRM and Sharepoint Online instead of on-premises products as they require specific dll's inorder for code to work. Dll's doesn't work for Online products.

Thanks,
SD_Dev 

CRM 2015 Breaking outlook ribbon

$
0
0

Hey all

We have had a issue arise at work where CRM seems to be breaking outlooks ribbon bar
We have found on google lots about a registry fix, but because we dont have any previous versions of office installed the fix doesnt work.

We have tried updating, re installing, and everything else we can think of but nothing seems to fix it

Does anyone have any ideas on what else could be going on?

Thanks in advance.


Make Campaign Form Read Only

$
0
0

Hi Guys,

I'm creating new form in campaign entity, and when I click custom ribbon, I would like to make this form become read only.

I already tried to change the form status, but, any of changed, didnt make this form become read only.

any idea how to solve this?

Microsoft Dynamics CRM migration of source code

$
0
0

Hi,

We are migrating from Microsoft Dynamics CRM code that is hosted in TFS Version control and we are moving to GIT, please help any free migration tool for this migration. Microsoft Dynamics CRM version is 2016 and TFS is 2010.

Thanks,

Lead Name field(Composite) is not working in Firefox

$
0
0

Hello Team,

I am facing issue in Lead form. when i am trying to create a new lead, Name (Composite field is not working) means flyout is not working(First and last name not populating) but  for Update form/ existing lead i am able to update Name Composite Fields.

Please help me out here

Dynamics Marketing trial

$
0
0

How to get Dynamics marketing trial environment?

reporting on activity with custom fields

$
0
0

To make a view that allows to display appointments and phone calls with custom fields, I was obliged to make an SSRS report

The problem is that I want to sort by creation date
Then I think I need to create a dateset that contains the union of the two datasets

I use fetch xml to retrieve both datasets
i would like to thank you in advance for your consideration

HTML web Page Integration

$
0
0

Hi i am new to MSCRM and i got the following requirement and its urgent please help me with code.and steps.

1.Create a web page to get the following fields from user – id,  name, age, occupation, fullname 

integrate with crm and

2.Provide a button save. On clicking save it should find the id in CRM. If the id exists, then should update the values in corresponding CRM record

Else create with the entered values.

Regards.

How to Fetch a field in another entity JavaScript

$
0
0

This is my function it's reaching to alert 8 but its giving me an error in firstchild..

Any help?

function FetchCity()
{

//getting city from citizen
var City = Xrm.Page.getAttribute("new_city").getValue();
alert("alert city 1");

if ( City != null && City != "")
{
var Country;

var serverUrl = Xrm.Page.context.getClientUrl();

if (serverUrl.match(/\/$/))
{
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}

alert("alert city 2");
alert(City[0].id.toString());

//query to fetch
// To be updated as required

var fetchXml = "<fetch mapping='logical' version='1.0'>"
+ "<entity name='new_city'>"
+ "<attribute name='new_cityid'/>"
+ "<attribute name='new_country'/>"
+ "<filter type='and'>"
+ "<condition attribute='new_cityid' operator='eq' value='" + City[0].id+ "'/>"
+ "</filter>"
+ "</entity>"
+ "</fetch>";

alert("city 3");


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)
{
alert("city4");
var vals = doc.getElementsByTagName("KeyValuePairOfstringanyType");
alert(vals.length);
for (var j = 0; j < vals.length; j ++ )
{
alert("city5");
if(vals[j].getElementsByTagName("key")[0].firstChild.nodeValue =="new_country")
{
alert("city 6");
Country= vals[j].getElementsByTagName("value")[0].textContent;

alert("country check 1");
alert(Country);
}

if( ! CheckFetchedValueExistance('new_country', vals, 'key'))
{
alert("City Not Found.");
}
}
}
else
{
alert(7);
var vals = doc.getElementsByTagName("a:KeyValuePairOfstringanyType");
alert(vals.length);

for (var j = 0; j < vals.length; j ++ )
{
alert(8);
if(vals[j].getElementsByTagName("key")[0].firstChild.nodeValue =="new_country")
{
alert(9);
Country= vals[j].getElementsByTagName("value")[0].getElementsByTagName("Id")[0].textContent;
CountryName = vals[j].getElementsByTagName("value")[0].getElementsByTagName("Name")[0].textContent;
alert("country check 2");

var value = new Array();
value[0] = new Object();
value[0].id = Country;
value[0].name = CountryName;
value[0].entityType = "new_city";

Xrm.Page.getAttribute("new_country").setValue(value);

alert(Country);
}

if( ! CheckFetchedValueExistance('new_country', vals, 'key'))
{
alert("City Not Found.");

Xrm.Page.getAttribute("new_country").setValue(null);

}
}

}

//set fetched country on citizen

var lookup = new Array();
lookup = Xrm.Page.data.entity.attributes.get("new_country").getValue()[0].name;

alert(lookup);

Xrm.Page.getAttribute("new_country").setValue(lookup);

}
}

// function to check if field contains value
function CheckFetchedValueExistance(names, vals, key)
{
for (var j = 0; j < vals.length; j ++ )
{
if(vals[j].getElementsByTagName(key)[0].firstChild.nodeValue == names)
{
return true;
}
}
return false;
}


ISV code not allowing to import data

$
0
0

Hi I have a problem,

When I'm trying to import data to Microsoft Dynamics CRM, the error occurs "ISV code aborted the operation". I tried to turn of the duplicate detection rules, but the error is still there, maybe someone could help to solve this problem out? 

Thank you. 

How to get Outlook calendar to sync with Dynamics service calendar

$
0
0

Hi,

We have Office365 with exchange and Dynamics CRM Online.

We want the Dynamics calendar and the Outlook calendar to be synced. So you can create an appointent in Outlook and it shows up in Dynamics and vice versa. How do we do that?

I think I read that this is possible if you had Exchange Online.

Thanks in advance.

Why we need to register a plugin for both message SetState and SetStateDynamicEntity?

$
0
0

Hi CRM User,

Why we need to register a plugin for both message SetState and SetStateDynamicEntity?

Whether you are deactivate record from the CRM form/SDK/Javascript, In all case I  getting SetStateDynamicEntity message.

Three way relationships in Entities

$
0
0

Hi all,

Please consider the below case and suggest solution.

Master Entity: Consists of information that is consistent i.e. Class students: Name, Age, Address etc.

Child Entity: Consists of Related information i.e. Students information in each semester, Semester 1: Total Marks, subject details, achievements etc.

Sub Child Entity: Consists of related information of Child entity i.e. Marks breakup in each subject for each semester, English: Sem1 : 40, Sem2: 30 etc.

I think I shall create 3 separate entities for this scenario and 3 different forms. 

Sub Child can be added as a grid in Child Form

Student name can be a lookup in Child Entity

How the relations between all 3 entities be set

Can I show a report and display all records from 3 entities in one form

*** Most important: How will I be able to import data from a single sheet excel file.

Please suggest if my understanding and plan is correct and if there is anything I shall be knowing for relations between entities, please let me know.

Regards 

Deepak Kumar

Html Integration

$
0
0

I have a HTML web page with field values of an entity. i need to integrate it to my crm what would be the best option. reply me with code its my company requirement plss.

Regards, 

Viewing all 46379 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>