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

Relationship between entity and attribute

$
0
0

I want entity and attribute with relationship with that.

ParentEntity.attribute ChildEntity.attribute
Lead.LeadIdAccount.fk_Leadid

How to get this , with out any tool.


Registering Workflow Assembly

$
0
0

I have created a simple C# project (Class Library .NET) in Visual Studio 2017. I want to extend a workflow with this custom code and used this as reference:

https://community.dynamics.com/crm/b/scaleablesolutionsblog/archive/2016/07/20/auto-generate-word-template-in-dynamics-crm-2016-and-attach-in-email

My project targets .NET Framework 4.5.2 and I signed my assembly with the Strong Name Tool (sn.exe). 

The project contains one class looking as follow (used above link as reference):

using System.Activities;
using Microsoft.Xrm.Sdk.Workflow;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Crm.Sdk.Messages;

namespace DynamicsTest
{
    class MoveFiles : CodeActivity
    {
        [Input("SourceQuote")]
        [ReferenceTarget("quote")]

        public InArgument<EntityReference> SourceQuote { get; set; }

        protected override void Execute(CodeActivityContext executionContext)
        {
            //Create the context
            IWorkflowContext context = executionContext.GetExtension<IWorkflowContext> ();
            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory> ();

            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
            // Get the target entity from the context
            Entity regQuote = (Entity)service.Retrieve("quote", context.PrimaryEntityId, new ColumnSet(new string[] { "name", "ownerid" }));
            string quoteName = (string)regQuote.Attributes["name"];
            EntityReference ownerid = (EntityReference)regQuote.Attributes["ownerid"];


            Entity emailEntity = new Entity("email");
            Entity fromParty = new Entity("activityparty");
            fromParty.Attributes["partyid"] = new EntityReference("systemuser", context.InitiatingUserId);
            EntityCollection from = new EntityCollection();
            from.Entities.Add(fromParty);

            Entity toParty = new Entity("activityparty");
            toParty.Attributes["partyid"] = new EntityReference("systemuser", ownerid.Id);
            EntityCollection to = new EntityCollection();
            to.Entities.Add(toParty);

            EntityReference regarding = new EntityReference("quote", context.PrimaryEntityId);

            emailEntity["to"] = to;
            emailEntity["from"] = from;
            emailEntity["subject"] = "Quote Summary of " + quoteName;
            emailEntity["regardingobjectid"] = regarding;
            Guid EmailID = service.Create(emailEntity);

            EntityReference abc = SourceQuote.Get<EntityReference>(executionContext);
            AddAttachmentToEmailRecord(service, EmailID, SourceQuote.Get<EntityReference> (executionContext));
        }

        private void AddAttachmentToEmailRecord(IOrganizationService service, Guid SourceEmailID, EntityReference QuoteID)
        {

            //create email object
            Entity emailCreated = service.Retrieve("email", SourceEmailID, new ColumnSet(true));
            QueryExpression QueryNotes = new QueryExpression("annotation");
            QueryNotes.ColumnSet = new ColumnSet(new string[] { "subject", "mimetype", "filename", "documentbody" });
            QueryNotes.Criteria = new FilterExpression();
            QueryNotes.Criteria.FilterOperator = LogicalOperator.And;
            QueryNotes.Criteria.AddCondition(new ConditionExpression("objectid", ConditionOperator.Equal, QuoteID.Id));
            EntityCollection MimeCollection = service.RetrieveMultiple(QueryNotes);

            if (MimeCollection.Entities.Count > 0)
            { //we need to fetch first attachment

                Entity NotesAttachment = MimeCollection.Entities.First();
                //Create email attachment
                Entity EmailAttachment = new Entity("activitymimeattachment");

                if (NotesAttachment.Contains("subject"))
                    EmailAttachment["subject"] = NotesAttachment.GetAttributeValue<string>("subject");
                    EmailAttachment["objectid"] = new EntityReference("email", emailCreated.Id);
                    EmailAttachment["objecttypecode"] = "email";

                if (NotesAttachment.Contains("filename"))
                    EmailAttachment["filename"] = NotesAttachment.GetAttributeValue <string>("filename");

                if (NotesAttachment.Contains("documentbody"))
                    EmailAttachment["body"] = NotesAttachment.GetAttributeValue <string>("documentbody");

                if (NotesAttachment.Contains("mimetype"))
                    EmailAttachment["mimetype"] = NotesAttachment.GetAttributeValue<string>("mimetype");

                service.Create(EmailAttachment);
            }

            // Sending email
            SendEmailRequest SendEmail = new SendEmailRequest();
            SendEmail.EmailId = emailCreated.Id;
            SendEmail.TrackingToken = "";
            SendEmail.IssueSend = true;
            SendEmailResponse res = (SendEmailResponse)service.Execute(SendEmail);
        }

    }
}


The SDK packages are downloaded from NuGet (latest 9.0.0.7).

When I try to use the Registration Tool (version: 9.0.0.9154 64bit) I get the following error when trying to register my assembly:

Any clue what I am doing wrong, do I need to mark the class as Plugin or something? And if I want to do that, how do I keep above code working? 

Resource Scheduling - Install on Two Organizations (On-Premise)

$
0
0

Overview

I am having some issues installing Field Service.  The install claims to work however I get peculiar errors and performance issues.

I have different setups for development (single server) and staging (2 web front ends, 2 SQL in  Always On High Availability Groups) but the symptoms are identical for both configurations.

I installed the following packages in this order

  • ScheduleCommon_managed
  • ScheduleCommon_Patch_managed
  • FieldService-Full-6_2_0_342-8bfc84b89c-M
  • FieldService-Patch-6_2_1_38-5ea54f2c17-M
  • appmodule
  • anchor

My installs on Organizations were in this order

CRM EnvironmentOrganizationResult
DevelopmentSandboxWorking fine
DevelopmentDevelopmentError
StagingTestWorking fine
StagingTrainError

Symptoms

When I try to view the Schedule Board it fails to load on the second Organization that it was installed on.  I was getting some errors in debugger specifically 500 errors for SchedulerUIFactory.js.  The associated trace for this includes this error.

Request vsopscrmdev01.vs.net/.../WebResource.ashx;_dc=1522317368487 failed with exception System.InvalidOperationException: CRM Parameter Filter - Invalid parameter '_dc=1522317368487' in Request.QueryString on page /Development/Handlers/WebResource.ashx
The raw request was 'GET /Development/{636579089830000112}/WebResources/msdyn_/fps/scheduleboard/FPS/SchedulerUIFactory.js?_dc=1522317368487' called from vsopscrmdev01.vs.net/.../scheduleboard.html;sitemappath=FieldService%7cWO%7cmsdyn_Scheduler_urlspage.


When I tried to look at the Scheduling Parameters I got a message telling me that the record was unavailable and the trace included a few errors notably:

msdyn_schedulingparameter With Id = 515227b9-fcff-4585-944f-0ba4cfa4187c Does Not Exist

Web Service Plug-in failed in SdkMessageProcessingStepId: {3E6B7D86-4733-E811-80F2-00155D12D202}; EntityName: msdyn_schedulingparameter; Stage: 30; MessageName: Retrieve; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Every element seems to work correctly on the first install but not the second.  I tried to uninstall and reinstall on the second Organization but this did not resolve it.

 Work Around

Uninstalling the solutions from the first Organization and installing it against the second Organization resolved the issue.

While I can work with this to some extent - particularly for Development - I foresee issues down the line when I move from Testing into Training essentially I cannot run Field Service on my Test and Training Organizations simultaneously.  Has anyone else experienced similar issues is there something that can be done to allow this to operate properly?  I presume that the resources required are installed in a way that prevents there from being two copies?  Any help would be greatly appreciated.

Portals in Dynamics CRM

$
0
0

Hi All,

I have gone through Partner portal but don't have much experience in portals.

Can any give me the real scenario when to use Partner Portal, Customer Portal and Employee Portal in dynamics

crm? And what is the use of Partner, Employee and Customer Portal?

What is the difference between all 3?

Thanks,


Shahbaaz

Software Testing Tool Dynamics CRM (on Prem 8.2)

$
0
0

Can anyone guide me to the best software testing tool for dynamics CRM pls ?  Preferably trough recording with minimal technical/development input.  Thank you!

Add Items in subgrid automatically

$
0
0

Hi,

I'd like to add Items in my subgrid automatically.

Ex: I have account entity and payment entity and i have already established the 1:N Relationship

I want to appear the payment lines  automatically in the contact subgrid when they are entered in the payment entity

Thanks a lot.

D365 Server-Side Sync behavior when an email is being forwarded from one mailbox to another

$
0
0

Hello everyone.

I would like to know if anyone ran into the same issue and was able to find out the solution or an explanation of such behavior.

We use D365 CRM On-Premise 8.2.2.0112. Our email system is Exchange 2016 On-premise.

Earlier, we configured Server-Side Synchronization for a shared mailbox named support. This mailbox is available for our support engineers and is used to receive support requests from users and customers. Though, as a shared mailbox it is available in Outlook Desktop Clients, we decided to configure email forwarding to personal mailboxes of these engineers. This forwarding is configured on Exchange server. So, when an email is sent to support mailbox it appears there and in engineers' mailboxes simultaneously. This is used to reduce the time needed by any engineer to get familiar with the request because they are continuously monitoring their personal mailboxes and may not notice the email in the shared mailbox. In addition, when an email arrives into the support mailbox D365 creates a case and sends some notification emails. This configuration is working fine when users' mailboxes are not being synced with D365 CRM.

This year we have upgraded our Exchange 2013 servers to Exchange 2016. This allowed us to start using Dynamics 365 App for Outlook. One of the requirements is to use SSS for the user's mailbox. I have enabled SSS for one of the mailboxes and this mailbox passed all checks. After that I enabled D365 App for Outlook and it is working almost fine in OWA, but not in Desktop Outlook Client.

On the next morning we received an email to support mailbox and it has been forwarded to the mailbox with SSS enabled. After that I noticed an warning on the Mail Server Profile page, stating that an unknown error occurred during the sync of this email in the engineer's personal mailbox. This error does not give any clues but it has the following additional information: UnknownIncomingEmailIntegrationError -2147218683. I was able to locate this email in the support mailbox, but a case was has not been created.

We are going to move to D365 App for Outlook and we need to create cases from emails sent to support mailbox. These are manadatory requirements. I may remove the forwarding of these emails, but it would be great if we can continue with that.

So, now I am wondering how to resolve that and looking for an explanation. I understand that our configuration may be unsupported or maybe I missed something, but I am not able to find any useful information. Any help is much appreciated.

Creating New Organization in CRM 2016 On-premises

$
0
0

Hello everyone,

I want to create new organization in MS CRM 2016 on-premises. If i create new organization or import organization.I get this dialogue "To create a new organization,the wizard must remove the current organization.After the wizard complete you will no longer have access to this organization". 

New organization is getting created but my old organization is getting deleted. Same happen if i import organization also. I don't know what am missing.

Thanks in advance.

Karthik V


CRM Portal User Password reset token contains URL encoded characters and fails

$
0
0

Hi,

We are noticing that the generated password reset URL is changed in the process of sending (and/or receiving) the password reset e-mails.

The special characters like + and - are changed to  %2B and %2D, which changes the token and as a result the resetpassword functions fails.

Is this a known issue and is there a solution for this ?

Multiple similar and useless "associated view" links

$
0
0

Dear reader,

sometimes you have to show vulnerability if you want to grow. This time, I do feel pretty stupid, since the answer to this question seems to be so simple, but just couldn't find it up till now.
In our CRM 2016 (on prem) system this happens:

I'd love to describe it using the correct English terms, but if could do so, I would have googled my way out of this. So: why does my system show (sometimes) tens of similar links to "related views" from within an entity? For this example, user CRMAdmin (yeah, it's me so I'm allowed to use his first name only) has 18 of these rather useless links to empty related views in the pull down menu.

I'm missing the setting here and that does feel rather silly.
Who will redeem me?

Thanks in advance for thinking along with me.
Best regards,
Jeroen

Sharing Records

$
0
0

Dear Communities,

I have 1000 of account record GUIDs, want to know these records are shared to any team or any user.

Is there any programmatic way to approach?

Thanks & Regards,

Dan

"outer join" with advanced finds

$
0
0

Is there a way to create an advanced find to look compare 2 groups - if in group A but NOT in group B show me those?

Web API in 2016

$
0
0

We are in beginning phase of an upgrade from a 2011 on premise to 2016.

Our current 2011 environment uses an ASP.Net MVC web-api service whereby calls from javascript on form loads calls this service to determine various data in the CRM environment.  For example, it may use it to get data on a related entity record .

Is this kind of setup still viable with 2016. Knowing that 2016 has a web-api functionality now , trying to grasp the differences and whether our current setup could be ported over .

Determine which Relationship an Associated View Uses

$
0
0

Hello, 

I am trying to customize which 1:N relationship an associated view uses to display records. 

We currently have two 1:N relationships defined for Lead to Phone Call.  The first one is the OOB relationship "Lead_PhoneCalls" (Parental) and the second is a custom relationship we created called "cov_Lead_PhoneCall" (Referential) which we use for a custom workflow process.  The second one does not always get filled in on records.  So when I open the "Associated Phone Calls" view on a Lead record it does not show all the associated phone calls for the lead. I believe what is happening is that the Associated Phone Calls view is using our custom relationship instead of the OOB relationship. 

Is there a way to force the Associated Phone Call View to use the OOB Lead to Phone Call relationship without deleting our custom relationship? 

CRM Version: D365 On-Premise

Generic SQL Error When Creating Unit Group

$
0
0

Hello, 

I have set up a trial account for online with Dynamics 365 v. 1612 (9.0.1.621)(DB 9.0.1.621) online. 

When I go to create a Unit Group from Settings > Product Catalog > Unit Groups, it spins for a bit, then I get a SQL errror - the error in the log file is just "Generic SQL Error", which doesn't tell me much. 


I've tried delete all duplicate detection rules and turning off duplicate detection in the duplicate detection settings, as well as publishing my customizations following that and am still running into this error. 

I **am** able to create other records like contacts, accounts, etc. Is there a limit to how many unit groups are allowed? Is this because it is a trial instance?

Help!


Dynamics 365 v8.2 Solution missing component msdyn_wallsavedqueryusersettings

CRM 2016 Marketing List exports to xls instead of xlsx

$
0
0

CRM | Marketing Lists | [select a marketing list] | [expand the member list] | "Export Marketing List Members" dropdown and selecting "Static Worksheet (Page only)"

**PROBLEM: When choosing the Export Marketing List option, the resulting downloaded file ends with ".xls" but, when opened, Excel gives a warning that the file extension and file type do not match. 

In other areas I am able to export to xlsx, is there any reason why CRM exports to xls in this specific location (Marketing Member List)?

Minimal Copy

$
0
0

Hi Experts

I do have a Doubt about Minimal Copy. We need to copy all our Customization and code from Prod to QA.

But we do not need all the data to be copied and also our users, teams and business Units. Can anyone  please explain what is the exact difference between Full copy and a  Minimal Copy? 

How to create webresource in CRM using javascript

$
0
0

All,

Is there any way where we can create web resource using javascript. I have written below code but it is throwing 500 internal server error. The same code works well with other standard entities.

var webResource = JSON.stringify({
"name": "new file",
"solutionid": "fd140aae-4df4-11dd-bd17-0019b9312238",
"content": content,
"webresourcetype": 5
});
var req = new XMLHttpRequest();
req.open("POST", encodeURI(Xrm.Page.context.getClientUrl() + "/api/data/v8.2/webresourceset"), 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.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 204) {
var uri = this.getResponseHeader("OData-EntityId");
var regExp = /\(([^)]+)\)/;
var matches = regExp.exec(uri);
var newEntityId = matches[1];
alert("new entity id = " + newEntityId);
}
else {
alert(this.statusText);
}
}
};
req.send(webResource);


Searching and performance issue for a specific systemuser(s)??

$
0
0

Let me start off with:

If I use my login on my machine and do a wildcard query against accounts: *microsoft I get results in a second or two

If I logout and login as one of the users having the issue, on the same machine, the above query SQL timeouts.

Furthermore, we have the same roles, we belong to the same teams, we are in the same business unit.

I tried reassigning all records that belonged to that user to myself to see if that was the issue, still the same.

If I create a brand new user now, this does not seem to be an issue.

Dynamics 2016 8.2.2.112 on prem.

Any thoughts / suggestions?

Thanks,

Dennis

Viewing all 46379 articles
Browse latest View live


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