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

KingswaySoft CDS/CRM Connection Manager keeps crashing

$
0
0

I am using Visual Studio 2015 with the KingswaySoft SSIS Integration Toolkit for Microsoft Dynamics 365 v11.0 (11.0.0.7160).

Every time I click organization dropdown Visual Studio crashes. There is no error message, and it just offers to restart or debug Visual Studio.

Has anyone else come across this issue?


Case Resolution using Microsoft flow

$
0
0

Hi Experts,

I need to achieve resolve case process using Microsoft flow. For this I am updating Case status and Creating record in Case Resoltuion entity using flow. But Flow fails giving following message:

"This message can not be used to set the state of incident to Resolved. In order to set state of incident to Resolved, use the CloseIncidentRequest message instead."

Need some ideas about how I can achieve this.  

Thanks in advance:)

Javascript to set today datetime timezone issue

$
0
0
Hi Experts, We have ActualStartDate field on Form and onLoad we are setting today date using JS to this field. Below is the code snippet.
var d =new Date();
Xrm.Page.getAttribute("ActualStartDate").setValue(d);
Xrm.Page.data.entity.save();
PC Timezone - IST
CRM Logged in User Timezone - EST
Issue: Date() object is taking System DateTime which is in IST and while storing the date in UTC in Database, CRM System using EST which is CRM logged in User TimeZone to deduct/add hours based on timezone offset instead of IST.
Example:
System Current DateTime: 4/2/2019 12:22 PM IST
Date() object Time: 4/2/2019 12:22 PM IST
SQL DB field DateTime UTC: 4/2/2019 17:22 PM [Date() + 5 hours EST(UTC-5)]
Solution Proposed to Business:-
  1. Keep CRM Logged in user TimeZone and PC Timezone same. [This will not ensure 100% result as some user might have different timezone]
  2. Execute Custom Action from onLoad JS and update ActualStartDate from c# code [Performance impact on form load as it was taking more than 1 mins to update the record]
  3. tried converting Date() to UTC in JS but didn't work.
Please provide your inputs. Thanks in Advance!

Error when trying to export solution

$
0
0

Hi!

I get an error message when trying to export my solution and have no idea whats wrong.

Any suggestions? See error code below.

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An unexpected error occurred.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>e5391bd9-c017-4c7c-8246-376e75a5160f</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.WebServices.ExportXmlService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: An unexpected error occurred. ---> System.InvalidOperationException: The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type.
at System.Xml.XmlNode.AppendChild(XmlNode newChild)
at System.Xml.XmlNode.AppendChild(XmlNode newChild)
at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.AppendAppModuleSiteMapXml(XmlDocument exportDocument, Guid siteMapId, String siteMapElementInnerXml)
at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.AppendXml(XmlDocument exportDocument, Guid siteMapId, String siteMapElementInnerXml)
at Microsoft.Crm.Tools.ImportExportPublish.SiteMapExportHandler.ExportItem(XmlDocument exportDocument, Guid siteMapId)
at Microsoft.Crm.Tools.ImportExportPublish.AppModuleSiteMapHandler.ExportItem(XmlDocument exportDocument)
at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc)
at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport()
at Microsoft.Crm.WebServices.ExportXmlService.ExportSolutionWithTargetVersion(String solutionName, Boolean managed, String targetVersion, Boolean exportAutoNumberingSettings, Boolean exportCalendarSettings, Boolean exportCustomizationSettings, Boolean exportEmailTrackingSettings, Boolean exportGeneralSettings, Boolean exportMarketingSettings, Boolean exportOutlookSynchronizationSettings, Boolean exportRelationshipRoles, Boolean exportIsvConfig, Boolean exportSales, Boolean exportExternalApplications, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">681f0f11-8e01-40a1-8d84-424242bb392c</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">1</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">e5391bd9-c017-4c7c-8246-376e75a5160f</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>An unexpected error occurred.</Message>
<Timestamp>2019-04-02T06:52:00.0623075Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

Do Activity Wall Posts get processed when Dynamics CRM is in admin mode with background services disabled?

$
0
0

Do Activity Wall Posts get processed when Dynamics CRM is in admin mode with background services disabled?

Change a field when a second e-mail has been sent in a Case

$
0
0

Hi,

I work with Cases in CRM,

When an email is sent to us, a Case is created with an Email which is OK.

I have a Field that is named "New E-mail" which is a Two Options Yes/No.

When the email comes in the first time, it is no which is OK.

But if a customer sends a second email on the same case, i would like to update the field "New E-mail" to Yes. So that we don't miss second emails on the Cases.

Any idea how to achieve this?

Thanks in advance.

Dynamics CRM license

$
0
0

Hello,
I plan to change my Dynamics CRM license, "Microsoft Dynamics CRM Online" to "Microsoft Dynamics Engagement" and ask if anyone has ever done this, and what are the impacts

Adding stage to a Business Process Flow

$
0
0

Dynamics 365 1612 (8.2.2.112) on premises

When editing an Opportunity business process flow to add a new stage, I can no longer go back through previous stages in any active Opportunities. Error is regarding Invalid traversed path.

Is there a way to get around this?

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Invalid traversed path.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>ec9c1bcf-5c85-470f-9652-567e5d6212ff</ActivityId>
<ErrorCode>-2146885625</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Invalid traversed path.</Message>
<Timestamp>2019-04-01T09:28:16.9487904Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]
[bb48066e-f22f-412f-a530-91f72e4b859b: GlobalActiveStagePlugin]


</TraceText>
</OrganizationServiceFault>


Add Subgrid Using Quick View Form

$
0
0

I have two Account form (Parent and Child Account form with 1:N relationship).

I have 1:N relationship from Account to Case and create the case records from Account entity using the case subgrid.

So now, I added the case subgrid on the Parent Account Form which shows all the cases related to the Child Account.

My question is that Is it possible to add two association block or subgrid using quick view in which, in the first block it shows all the case related to Child Account and other shows all the cases related to Parent Account?

Change Child case to another Parent Case

$
0
0

Hi,

I would like to attach a Child case to a different Parent case. On the forum I was not able to get the right information. Can anyone help me how I'm able to perform this request.

Thank you

How to automatically remove attachments from email and notes and put on Sharepoint on line

$
0
0

I put the same question on Dynamics 365 General forum and then someone suggested I put here as well.

Hope to get some inputs/suggestions.

I followed the Sharepoint (on line/365) and Dynamics CRM (also on office 365) integration steps and while it does work for removing 'Documents' from CRM TO Sharepoint (creating link in CRM) BUT I do not know how I can detach 'attachments' from email or Notes and put on Sharepoint on line, automatically. Though there might be some 3rd party paid tools, but is there any way we can do it without having to buy a 3rd party tool?

Thanks

How to change order of dashboards

$
0
0

I added a new dashboard to my user and now it shows as default (first thing shows when the form loaded), how do I change it ? I don't need it as default how do I change it ?

How to Define SMS Template same like Email template and instantiate through code.

$
0
0

Hello Experts,

Is there any functionality to define SMS template where business can compose their SMSs and insert any field from contact and that populates in the actual message according to the Contact record, I mean same functionality like Email Template where we insert dynamic values like {!EntityLogicalName:FieldLogicalName;}.

Please suggest any OOB or lighter way to achieve this. Thanks in advance.

Thanks

Update modifiedon field on data migration

$
0
0

Hi there,

I am doing migration from CRM 2016 on Premise to CRM 365 online using Kingswaysoft.

I am trying to update createdon/by, modifiedon/by fields.

I know it is not possible to map directly in Kingswaysoft but I read in some blogs that we can do it using Pre-Operation plugin.

I have registered the plugin on Pre-Operation on Account, populated createdon, modofiedon fields in holding fields but my plugin is not updating the modifiedon fields.

Is there any changes in latest versions of CRM to not allow to update modifiedon field from plugins as well?

CreatedOn updated with historic date but not modifiedon.

Below is my code to update

tracing.Trace("Before conditions");

if (entity.Attributes.Contains("sfaa_commsdate"))
{
craetedOn = (DateTime)entity.Attributes["sfaa_commsdate"];
tracing.Trace("craetedOn " + craetedOn);
}
if (entity.Attributes.Contains("sfaa_la"))
{
craetedBy = entity.Attributes["sfaa_la"].ToString();
tracing.Trace("craetedBy " + craetedBy);
}

if (entity.Attributes.Contains("lastonholdtime"))
{
modifiedOn = (DateTime)entity.Attributes["lastonholdtime"];
tracing.Trace("modifiedOn " + modifiedOn);
}

if(entity.Attributes.Contains("sfaa_local"))
{
modifiedBy = entity.Attributes["sfaa_local"].ToString();
tracing.Trace("modifiedBy " + modifiedBy);
}

entity["createdon"] = craetedOn;
entity["createdby"] = new EntityReference("systemuser", new Guid(craetedBy));
entity["modifiedon"] = modifiedOn; // DateTime.Now.AddYears(-3);
entity["modifiedby"] = new EntityReference("systemuser", new Guid(modifiedBy));
//entity.Attributes.Remove("modifiedon");
//entity.Attributes.Remove("modifiedby");
//entity.Attributes.Add("modifiedon", modifiedOn);
//entity.Attributes.Add("modifiedby", new EntityReference("systemuser", new Guid(modifiedBy)));
tracing.Trace("Updated the fields");

Thanks

krishna

user should not be able to see all activities except admin

$
0
0

Hi,

If an user(user1) is having a user level privilege on an activity entity, then user should not be able to see activities of other users in the activities menu, but that user is able to see all activities. That activities should not be the visible to user1. Only admin user should be able to see activities of all users. if anyone faced the same error, please share how to achieve the desired result.

Regards,

Hardik Chauhan


Remove tool bar in embedded report in Iframe

$
0
0

We are using CRM 365 V9 on premise. I have a report that display the record summary in an iframe on the form. I use the javascript to set the report URL. The problem is that I got a "Edit Filter" button and report toolbar on top of the report that I don't know how to remove. Any help? Thanks.

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

var action = "run";

var context = "records";

var reportId = "8158b6c6-b354-e911-a2c5-005056933618";

var recordid = Xrm.Page.data.entity.getId().replace("{", "").replace("}", "");

var etc = Xrm.Page.context.getQueryStringParameters().etc;

var url = orgUrl +

"/crmreports/viewer/viewer.aspx?action=" + encodeURIComponent(action) +

"&context=" + encodeURIComponent(context) +

"&id=%7b" + encodeURIComponent(reportId) + "%7d" +

"&records=%7b" + encodeURIComponent(recordid) + "%7d" +

"&recordstype=" + encodeURIComponent(etc););

iframeObject.setSrc(url);

An error has occurred. Please return to home page and try again in reactivating case

$
0
0

Hi All,

Need help urgently. Recently we are upgraded to CRM 9.0. After the upgrade we are facing a issue for few users like "An error has occurred. Please return to home page and try again".

While reactivating the case CRM is throwing this error for few users. Here is my scenario- User A & B has same roles, A can activate the case but not the B. Case is not owned by either of them. 

Please help me in resolving this issue, we are facing this situation in Production environment.

Please go through the screenshot below.

RetrieveMutipleRequest is not available in Visualstudio environment, why?

$
0
0

I have trying to write my first CRM plug in from my visual studio 2015 which has Microsoft 365 Developer toolkit installed, and the plug in is created from the template as my screenshot below.

My question is  why isn't the RetrieveMultpleRequest compiled

RetrieveMultipleRequest rmreq = new RetrieveMultipleRequest(); // not compiled

RetrieveUnpublishedMultipleRequest rmreq1 = newRetrieveUnpublishedMultipleRequest(); // the similar method of this is compiled.

I know these example codes used in CRM 4.0, Does that mean the  RetrieveMultipleRequest method is retired? then what is his replacement method.

The following is the sample plugin code I want to implement from internet : http://mileyja.blogspot.com/2011/04/instantiating-service-object-within.html

 public void Execute(IServiceProvider serviceProvider)
        {
            
            // Obtain the organization service reference.

            IPluginExecutionContext context = (IPluginExecutionContext)
               serviceProvider.GetService(typeof(IPluginExecutionContext));

            IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
          

            // The InputParameters collection contains all the data passed in the message request.
            if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
            {
                // Obtain the target entity from the input parmameters.
                Entity entity = (Entity)context.InputParameters["Target"];

                if (entity.LogicalName == "contact")
                {
                    if (entity.Attributes.Contains("address1_city") == false)
                    {
                        

                        RetrieveMultipleRequest rmreq = new RetrieveMultipleRequest();
                        RetrieveMultipleResponse rmresp = new RetrieveMultipleResponse();
                        
                        
                        QueryExpression query = new QueryExpression()
                        {
                            EntityName = "systemuser",
                            ColumnSet = new ColumnSet(true),
                            Criteria = new FilterExpression
                            {
                                FilterOperator = LogicalOperator.And,
                                Conditions = 
                                {
                                    new ConditionExpression
                                    {
                                        AttributeName = "systemuserid",
                                        Operator = ConditionOperator.Equal,
                                        Values = { context.UserId.ToString() }
                                    }
                                }
                            }
                        };

                        rmreq.Query = query;
                        rmresp = (RetrieveMultipleResponse)service.Execute(rmreq);
                        Entity user = (Entity)rmresp.EntityCollection.Entities[0];

                        entity.Attributes.Add("address1_city", context.UserId.ToString() + ": " + user.Attributes["fullname"]);
                    }
                    else
                    {
                        // Throw an error, because account numbers must be system generated.
                        // Throwing an InvalidPluginExecutionException will cause the error message to be displayed in a dialog of the Web application.
                        throw new InvalidPluginExecutionException("Bad, Naughty Plug-in, Don't do that!.");
                    }
                }
            }
        }

 

Plug in "Early-Bound" and "Later-Bound", can anybody provide some detailed examples? thanks

$
0
0

I am new in CRM, and just practice writing Plug in, I can see "Early-Bound" and "Later-Bound" appeared everywhere, and I am confused it.

I appreciate if any expert can provide any simple examples to help me understand it.

Much appreciated.

Send ics file in email using sdk

$
0
0

I'm trying to send an ics file attached to an email so the recipient(s) get an appointment invitation.

For a variety of reasons I can't use appointment sync to send the invites.

My code is working fine when the recipient is @googlemail.com but when their on Exchange, the attachment doesn't give the expected Accept/Decline/etc. buttons unless you open the attachment.

I have tried a variety of methods but the ones I think should work are:

  • Setting the MimeType of the email to "multipart/mixed"
  • Setting the MimeType of the attached file to "text/calendar" (possibly with ";method=REQUEST)
BEGIN:VCALENDAR
PRODID:-//Voyager Software//Training//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
DTSTART:20190406T133000Z
DTEND:20190406T143000Z
DTSTAMP:20190402T130711Z
ORGANIZER;CN=The Organizer:mailto:me@us.com
UID:bfnuadapfgs91eqihepacgq2lm@us.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE;CN=The Organizer;X-NUM-GUESTS=0:mailto:me@us.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=the recipient;X-NUM-GUESTS=0:mailto:you@them.com
CREATED:20190402T130709Z
DESCRIPTION:some description
LAST-MODIFIED:20190402T130709Z
LOCATION:somehwere
X-ALT-DESC;FMTTYPE=text/html:<html><body><a href='http://bing.com'>Bing</a></body></html>
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:test
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR


The code to create the email and the file:

var email = new Email
{
    To = new ActivityParty[] { toParty, },
    From = new ActivityParty[] { fromParty },
    Subject = "Test Appointment",
    Description = "Please open the attached file to accept the appointment.",
    DirectionCode = true,
    MimeType = "multipart/mixed"
};

Console.WriteLine("Create Email");
Guid gEmail = service.Create(email);

var ical = new Entity("activitymimeattachment");

ical["mimetype"] = "text/calendar";//;method=REQUEST
ical["body"] = appointment.GetICS();//Base64 encoded version of vCalendar above
ical["subject"] = "Appointment";
ical["filename"] = appointment.Filename;
ical["objectid"] = new EntityReference("email", gEmail);
ical["objecttypecode"] = email.LogicalName;

Console.WriteLine("Create Attachment");
service.Create(ical);

SendEmailRequest sendEmailreq = new SendEmailRequest
{
    EmailId = gEmail,
    TrackingToken = "",
    IssueSend = true
};

Console.WriteLine("Send Email");
SendEmailResponse sendEmailresp = (SendEmailResponse)service.Execute(sendEmailreq);
Viewing all 79901 articles
Browse latest View live


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