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

Multiple Actions called from Dialogs - 2nd Acton's not showing?

$
0
0

CRM 2016 on preminse

I've a dialog that collects responses, that runs fine.

I've added my first action to set something - that's fine

Then I added subsequent actions into the dialog, BUT i can't select them from the dialog - i only see the first action!

Would you have any idea why this might be?  Is there a limit 


Error when creating new phoneCall entity due to marketing campaign response

$
0
0

Hello everyone.

I have developed a MS Dynamics integration that uses the XRM SDK to create phoneCalls. One of the customers that uses the integration, however, is having an error when trying to create a call. I did some debugging, and the error that is being thrown says: 

"Unexpected exception from plug-in (Execute): ****.Crm.Plugins.PhoneCall.SetCampaignResponse: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary."

To be more specific, this error happens whenever I call the IOrganizationService.create to try to create the call in the customer's MSDynamics instance.

I understand that this error is thrown when the code tries to access a non-existing property from a dictionary, but I couldn't extract any more useful information from the stack trace. I believe it would help a lot to figure out which key is not present in the payload or at least how can I get more details about this error.

Any help would be appreciated. 

Duplicate detection using JavaScript

$
0
0

Hello,
I am trying to write a function which throws an error message if one of the records has a few field records which are duplicate.
Name of entity - dev_employee
Name of the lookup field - dev_centerid
Name of the field which needs to be checked for duplicates - dev_employeeid

So I am using SDk.Rest method to retrieve all the dev_employee records in which the dev_centerid is equal to the current record on which it will be run.

function EmployeeDuplicateDetection() {
var ecid = Xrm.Page.data.entity.attributes.get("dev_centerid").getValue()[0].id;
var EmpID = Xrm.Page.getAttribute("dev_employeeid").getValue();
var containsDuplicates = false;
SDK.REST.retrieveMultipleRecords(
"dev_employee",
"?$select=dev_employeeid,dev_entertainmentcenterid&$filter=dev_entertainmentcenterid/Id eq guid'" + ecid,
function (results) {

if (results.length > 0)
{
int length = results.length;
for(i=0; i<length; i++)
{
var employeeID = results[i].dev_employeeid;
if(employeeID == EmpID)
{
alert("Record with same Employee ID already exists. Please use different ID.");
}
}
}
},
function (error) {
alert(error.message);
},
function () {
//On Complete - Do Something
}
);
}


I am thrown a EmployeeDuplicateDetection() cannot be run on Event handler error. I have loaded the Rest.SDK library to the form as well.

Dynamics worksheets and Dynamics 365 app for Outlook

$
0
0

We currently have Dynamics 365 and business users are on Outlook 2010 that has Outlook Add-in installed for tracking etc. This also helps business users refresh dynamic worksheets sent to them using the add-in.

Now with the July update this add-in has been deprecated and we are also upgrading users to Outlook 2016 which uses Dynamics 365 app for Outlook. I believe this requires server side sync to be enabled for business users  to allow tracking etc. from Outlook.

Question is how can business users now refresh the dynamic worksheets sent to them as Outlook Add-in will no longer be there?

System.Exception: Dependencies found on the attribute

$
0
0

Hi, I am trying to update the fieldname "takfield" to "taskfieldid" (Lookup) from XRM Toolbox Attribute Manager,

But I am unable to update it. I got the below error message

Publishing Entity folderEntity
Checking for Delete Dependencies for folderEntity.taskfield
System.Exception: Dependencies found:
SystemForm 27cb9f60-8c65-4cf7-a0f5-90b1da9f6180
at DLaB.AttributeManager.Logic.AssertCanDelete(IOrganizationService service, AttributeMetadata attribute)
at DLaB.AttributeManager.Logic.MigrateToNew(Steps stepsToPerform, AttributeMetadata tmpAtt, AttributeMetadata newAtt, Action actions)
at DLaB.AttributeManager.Logic.Run(AttributeMetadata att, String newAttributeSchemaName, Steps stepsToPerform, Action actions, AttributeMetadata newAttributeType)
at DLaB.AttributeManager.AttributeManagerPlugin.<>c.<ExecuteSteps>b__38_2(BackgroundWorker w, DoWorkEventArgs e)

Thanks.

Connection NAV and CRM - (table connection named '' type CRM is no longer availible"

$
0
0

We are using the standaard integration from NAV  (2017 CU 13) to CRM. But when we sync a customer from NAV to CRM i get this error.

Anybody any ideas?

Emailed Record Link opens User Dashboard, not record

$
0
0

We use CRM Dynamics online.  Since the last upgrade, our Users have noted that links sent via email no longer directly opens the linked entity record.  Instead, their dashboard opens.  If they click the link again, a new window opens with the record.  Is there a way to change this behavior?  Our users are unhappy with having to click the link in email again and having so many windows open. 

Thank you,

Excel Online Import Errors

$
0
0

Hey all, I'm having trouble getting some of my fields to update via excel online. I have users aching to use this feature, and it seems pretty "hit and miss." On the success of the reimports of data.

I tested a column that a user was trying to update via excel online (The production group it's assigned to) and even when copying the format from the line above to a line below, I get the following error. I've also tried typing it in clean and get the error. I can't seem to figure out why this error is throwing, when the source data is from CRM, how could it not be required format? Any ideas?


Create related record using javascript

$
0
0

This is my first bit of code written for dynamics crm.

I started with this sample of how to create an account.  Worked like a charm.

https://szuyublog.wordpress.com/2016/02/22/microsoft-dynamics-crm-2016-web-api-create-an-entity-using-http-post-request/

Then I copied the working code and am trying to create a record in a different entity but of course it is not working.

Can someone tell me how to put error handling in so I know what the issue is.

I have psa installed and trying to create a record in msdyn_contractlinescheduleofvalue

I get all the values I want to insert from the salesorder/salesorderdetailid and then try to create the record

it never goes past this line of code     req.onreadystatechange = function ()

Then it returns a message box that says [Object Object]

How do I learn what I am doing wrong?

Here is my code:

function getSalesOrderIdthenCreatecontractlinescheduleofvalue() {
if(Xrm.Page.ui.getFormType() !==1 ) {
debugger;

//get all the values needed to create record

var contractId = Xrm.Page.getAttribute('salesorderid').getValue()[0].id;
var contractline = Xrm.Page.data.entity.getId();
var invoicedate = new Date();
var invoicestatus = '192350000';
var linename = "test";
var transactionclassification = '192350003';
var transactiontypecode = '192350004';


var entityType = "msdyn_contractlinescheduleofvalue";
var clientURL = Xrm.Page.context.getClientUrl();
var clsv = {};
clsv["msdyn_contract"] = contractId;
clsv["msdyn_contractline"] = contractline;
clsv["msdyn_name"] = linename;
clsv["msdyn_invoicedate"] = invoicedate;
clsv["msdyn_invoicestatus"] = invoicestatus;
clsv["msdyn_transactionclassification"] = transactionclassification;
clsv["msdyn_transactiontypecode"] = transactiontypecode;

CreateEntity(clientURL, entityType, clsv);
}
}

function CreateEntity(clientURL, entityType, entityData) {

var req = new XMLHttpRequest();
req.open("POST", encodeURI(clientURL + "/api/data/v8.2/" + entityType) , true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");

req.onreadystatechange = function () {                                           ///never goes into this function

       if (this.readyState == 4 /* complete */) {
           req.onreadystatechange = null; //avoids memory leaks


           if (this.status == 204) {
               var entityUri = this.getResponseHeader("OData-EntityId");
               alert(entityUri);

               console.log("Created " + entityType + " with URI " + entityUri);

           }

           else {

               var error = JSON.parse(this.response).error;
               alert(error);
               console.log(error.message);

           }

       }

   };

   req.send(JSON.stringify(entityData));


}

Uncaught ReferenceError: Xrm is not defined

$
0
0

Within a standard ASP.NET (WebAPI) project, I created this web page for an external site but I am encountering this: Uncaught ReferenceError: Xrm is not defined
Any help will be appreciated.

<!DOCTYPE html>
<html>
<head>
<script src="Scripts/jquery-3.2.1.js"></script>
<title></title>
<meta charset="utf-8" />
<script>
$(document).ready(function () {
var accountlist = $('accountlist');
$('#Getaccounts').click(function () {
console.log("testing 1234")
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: Xrm.Page.context.getClientUrl() + "/api/data/v8.0/accounts?$select=accountid,name",
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("OData-MaxVersion", "4.0");
XMLHttpRequest.setRequestHeader("OData-Version", "4.0");
XMLHttpRequest.setRequestHeader("Accept", "application/json");
XMLHttpRequest.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
},
async: true,
success: function (data, textStatus, xhr) {
var results = data;
for (var i = 0; i < results.value.length; i++) {
var accountid = results.value[i]["accountid"];
var name = results.value[i]["name"];
accountlist.append('<li>' + name + '</li>');
}
},
error: function (xhr, textStatus, errorThrown) {
Xrm.Utility.alertDialog(textStatus + " " + errorThrown);
}
});
});
});
</script>
</head>
<body>
<input id="Getaccounts" type="button" value="Getaccounts" />
<ul id="accountlist " />
</body>
</html>

Rich Text Editor on mobile website

$
0
0

Hi all,

We use Dynamics CRM 2015 on-premise. In one of our main entity forms, we have CKEditor textbox editor field (say: Field1). Lately, we have this requirement to expose this entity on mobile. We enabled this entity for mobile and configured the mobile form. However Field1 appears on mobile form with all its html tags and is not readable. 

One idea was to create a new field (say: Field2) , and onSave of form, strip all html and save the text to this Field2 and expose this field on mobile. This works with a catch! If a user updates Field2 on mobile, syncing Field2 with Field1 would strip Field1 of all html formatting. So this is not a workable solution.

Ideally, I would like Field1 to render both on main form and the mobile form. Is it possible? What other alternatives do I have?

Thanks,

Syed

CRM data migration with Scribe

$
0
0

Hi,

I've created a scribe job migrate the companies (Account entity) from on premise 2015 to online 2016.

When i run the scribe job, it finds the company id and performs an update. However when it has finished i am still not able to see the company in CRM online.

I have tried changing the owner on CRM on premise to myself but still it is not working.

Has anyone experienced this before?

Thanks and Kind Regards

Migrate user specific View from CRM 2013 to Dynamics CRM 365

$
0
0

Hello,

I have migrated my organisation's data from CRM 2013 to Dynamics CRM online.

However, user specific view (for example: My Open Opportunities) have not been migrated.

Is there a way I can migrate or suggest them for some Export/Import of their personal views?

Thank you.

[Dynamics 365 Portal] Can we change the field layout to horizontal (i.e. same row) instead of top/ bottom

$
0
0

Hi,

I am working on Customer Service portal. The default filed layout is - label appears at the top and then the control. Is it possible to change the layout of fields to horizontal (i.e. same row)?

Error when load portal

$
0
0

why when i load my portal, have the issue like this? please anybody help me.


Business Rules and Process permissions depth

$
0
0

I have users setup in different Business units .  Depending on their Business Unit , there are some on-demand workflows that  I want to give them  access to and others I want to hide.  So I've looked at I'm setting the depth of the permissions for workflows to Business Unit  and then setting the owner of the workflows to a user in a high business unit and then sharing out the workflows to the BU  default teams . This works well to allow me to control which workflows each BU team can see.

However, I have some pre-existing business rules on various entities which generate permissions  errors on save of the record when users with only BU level permission depth on processes try to save a record. Here is an example: 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: eadf3e02-78ad-e711-80d4-000d3ad11fb2, OwnerId: 1925a909-3152-e711-80ce-000d3ad11fb2, OwnerIdType: 8 and CallingUser: 1925a909-3152-e711-80ce-000d3ad11fb2. ObjectTypeCode: 4703, objectBusinessUnitId: a161193f-3052-e711-80ce-000d3ad11fb2, AccessRights: ReadAccess Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>58a6ea95-505a-4a7c-ae3c-356da2c51b7d</ActivityId>
<ErrorCode>-2147187962</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: eadf3e02-78ad-e711-80d4-000d3ad11fb2, OwnerId: 1925a909-3152-e711-80ce-000d3ad11fb2, OwnerIdType: 8 and CallingUser: 1925a909-3152-e711-80ce-000d3ad11fb2. ObjectTypeCode: 4703, objectBusinessUnitId: a161193f-3052-e711-80ce-000d3ad11fb2, AccessRights: ReadAccess </Message>
<Timestamp>2017-10-10T05:03:52.0638207Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[f1df3e02-78ad-e711-80d4-000d3ad11fb2: ]

</TraceText>
</OrganizationServiceFault>

The scope of the Business Rules is Entity. If I reduce the scope to 'All forms' the permissions errors go away but then the Business rules do not run. Alternatively, I can increase the depth of the permission on the Process entity to global and then the error goes away but that defeats my intention of selectively hiding workflows.    

Why must the Business Rule scope be set to Entity in order for them to run ? 

This is in v8.2.1.176

How to Mock OrganizationServiceContext in dynamics 365 workflow

$
0
0

I have used LINQ query to fetch the records in workflow using OrganizationServiceContext. So now I wanted to Mock the OrganizationServiceContext using MOQ DLL. Has anyone done this before? 

Plugin Execution if error occurs?

$
0
0

Hello every one,

I have 3 sync-plugins registered on update 

Plugin 1: Pre-Validation

Plugin 2 : Pre-operation

Plugin 3: Post-Operation

If the Plugin 3 fails, what will happen to the 1& 2?

Revise Quote - without creating a new Quote

$
0
0

Revising an Active Quote always creates a new Quote. Any which I can control this functionality?

Kindly advise.

Thanks.

Hide Area in Sitemap Editor

$
0
0

Hi All,

I want to hide Area such as "Field Service", "Resource Scheduling" through default Sitemap Editor. Could you please let me know, how to remove the Area ? 

Thanks in advance.

Viewing all 82002 articles
Browse latest View live


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