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

Navigating between the two forms duplicates a form

$
0
0

I have a serious issue which seems to be a bug with CRM.

When I load a form, I want to firstly, check the formType and if the formType is '1', I want to navigate to a one form and if the form type is anything else I want to navigate to another form. My code looks like this:

const FORM_ID_CREATE = 'dbc26353-1587-4d97-9ac4-c89e153510bf';
const FORM_ID_STANDARD = 'dce2ef9f-6680-4db1-b1fe-f49f99fb7408';

function checkFormType() {
  const formType = Xrm.Page.ui.getFormType();

  if (formType === 1) {
    navigateToForm(FORM_ID_CREATE);
  } else {
    navigateToForm(FORM_ID_STANDARD);
  }
}

function navigateToForm(formId) {
  const allForms = Xrm.Page.ui.formSelector.items.get();

  const currentFormId = Xrm.Page.ui.formSelector.getCurrentItem().getId();

  if (currentFormId.toLowerCase() !== formId.toLowerCase()) {
    allForms.forEach(form => {
      if (form.getId().toLowerCase() === formId.toLowerCase()) {
        form.navigate();
        return;
      }
    });
  }
}

When I run this code, it navigates to a new form happily and works just as I'd expect. Which I'm fine with.

However, when I press the close button on the form in the top right corner, it closes this form and shows another form underneath. It's as if there's a bug in CRM where two forms are displayed when form.navigate(); is ran. Has anyone seen a similar issue?

Does anybody have a solution to this?


Microsoft dynamic crm rest API fetch data by grouping records and with max date to filter duplecate records

$
0
0

I am trying to fetch records from CRM entity with restapi 

But i am not finding any way to perform group by dates and to filter records and keep the one with latest creation date.

$select=_aga_availabilityprofile_value,_aga_requireduser_value,_aga_assignedtoteam_value,scheduledend,scheduledstart,activityid&$filter=_regardingobjectid_value eq null and  (statecode eq null or  statecode eq 0)&$orderby=scheduledstart asc

i tried using fetch xml also but for date fields it is giving error

Can anyone help me.

Plugin not working after v9 update : MessageName "ConvertQuoteToSalesOrder"

$
0
0

Hi,

We have updated our DEV instance in v9. Almost all our plugins needed rework.

One of them simply does'nt work at all.

It's registered on the entity "quote" / Create / Pre Operation

We need to catch the event of the conversion of a quote to a salesorder

 if (context.ParentContext != null && context.ParentContext.MessageName == "ConvertQuoteToSalesOrder" )
{...}

This event isn't catched anymore. I can only catch the create event of a salesorder. Then, no more information on the quote which is being converted in the plugin context.

 var DevisGuid = (Guid)context.ParentContext.InputParameters["QuoteId"];


How can i get the quote Guid ?

I need it to do an action on each quotedetail wich are beeing converted into salesorderdetail.

Thany you in advance.

SharePoint online folder creation from CRM online plugin not working.

$
0
0

Hi All,

I have used the sample code provided on the link

code.msdn.microsoft.com/.../Discussions

to create a plugin firing synchronously on creation of account record to create a folder in the SharePoint online.

I am getting error message as below:

The remote server returned an error: (411) Length Required. By debugging the code I can see that it is failing in the method

public static byte[] SendHttpRequest(Uri uri, String method, byte[] requestContent = null, string contentType = null, HttpWebRequest clientHandler = null, Dictionary<string, string> headers = null)
{
HttpWebRequest request = clientHandler == null ? (HttpWebRequest)HttpWebRequest.Create(uri): clientHandler;

byte[] responseStream;


request.Method = method;
request.Accept = contentType;
request.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"; // This must be here as you will receive 403 otherwise
request.AllowAutoRedirect = false; // This is key, otherwise it will redirect to failed login SP page

// append additional headers to the request
if (headers != null)
{
foreach (var header in headers)
{
if (request.Headers.AllKeys.Contains(header.Key))
{
request.Headers.Remove(header.Key);
}

request.Headers.Add(header.Key, header.Value);
}
}


if (requestContent != null && (method == "POST" || method == "PUT" || method == "DELETE"))
{
if (!string.IsNullOrEmpty(contentType))
{
request.ContentType = contentType; // if the request has a body set the MIME type
}

request.ContentLength = requestContent.Length > 0 ? requestContent.Length : 0;
using (Stream s = request.GetRequestStream())
{
s.Write(requestContent, 0, requestContent.Length);
s.Close();

}
}

// Not using Using here as you may still like to access the reponse outside of this method
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8"));
responseStream = Encoding.UTF8.GetBytes(sr.ReadToEnd());

return responseStream;
}

The call to this method is from the method as below:

private Uri GetAdfsAuthUrl()
{
Uri corpAdfsProxyUrl = null;

Uri msoHrdUri = new Uri(msoHrdUrl);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(msoHrdUri);
// make a post request with the user's login name to
// MSO HRD (Home Realm Discovery) service so it can find
// out the url of the federation service (corporate ADFS)
// responsible for authenticating the user

byte[] response = HttpHelper.SendHttpRequest(
new Uri(msoHrdUrl),
"POST",
Encoding.UTF8.GetBytes(String.Format("handler=1&login={0}", this.username)), // pass in the login name in the body of the form
"application/x-www-form-urlencoded",
request);

STSInfo info = Deserialize<STSInfo>(response);

if (info != null && !String.IsNullOrEmpty(info.AuthURL))
{
corpAdfsProxyUrl = new Uri(info.AuthURL);
}


return corpAdfsProxyUrl;
}

The content length is definitely been mentioned and is not zero. Not sure why I am getting this error message.

Any help in this regards is much appreciated.

Many Thanks

migrating crm 2013 to crm 2015

$
0
0

Hi Experts, 

 

what are the things to be noted down while upgrading from dyanmics crm 2013 to 2015. 

how can we get the list of entity they are using and weather they are customized or not ? 

how can i connect and view the current plugins in the organisation( not having vs in their server). ?

should i take screenshots of security roles and workflows.? 

how to know ig there is any ADD-on they are using ?

it will be greatfull if someone shares any documentations.

Turn-off synchronize emailcontacts to Dyanmics contacts

$
0
0

Hi,

We use Dynamics 365 with server tot server synchronzing for all mails.

Sync of contacts and tasks is disabled.

But i notice that from all mails the from contact is automaticly added as contact in Dynamics. 

How can i disbale this?

Martijn de Vries

Customise print format for Quote

$
0
0

Hi,

I am working on Quote and not familiar with showing customize print format.

Is there way i can get steps how to create customize report for print ?

Regards

Faisal

Hosted Application Couldn't be created

$
0
0

Hello,

I am working on USD 4.0. when I am trying to open the USD It is showing the issues "Hosted Application couldn't be created". I check the configuration and deployment, every thing is fine, but I am unable to find the route cause to fix this issue. can any one Please help me to fix this issue. Its very urgent.  Thanks in advance.


what do they mean TotalRecordCount and ent.Entities.Count ?

$
0
0

Hi

when we use service.RetrieveMultiple() in our plugin there are two properties people check:

what does exactly mean by TotalRecordCount ?

what does exactly mean by Count ?

when TotalRecordCount  can be null instead of -1 ?

 

In my case i have one record in my collection and above mentioned properties showing following result: can any one explain please.

ent.TotalRecordCount -1
ent.Entities.Count 1

Thank you in advance.

Google Chrome runs out of Memory while working in 365 Dynamics

$
0
0

Google Chrome runs out of Memory while working in Dynamics CRM,

The computer has 9999 MB of virtual memory, 16 GB of ram, disabled hardware acceleration, and disabled the background processes from running in Chrome.

Using Dynamics 365 App for Outlook to track an appointment created by another CRM user

$
0
0

Hi all,

I've got a quick question regarding the use of the new Dynamics 365 app for Outlook and how it won't allow you to track an appointment organised by another CRM user. 

The situation is this:

Say for example we've got a EA that has access to their Executive's calendar and need to track appointments into the CRM on behalf of their Executive. The problem is that both the EA and the Executive has access to the CRM and hence the EA is not able to track appointments arranged by the Executive. Previously using the old COM plugin, they could copy the invite into their calendar and then track it using their account but in this case it looks like it has to be the person organising the appointment.

Is there a way around this so that EAs can track appointments on behalf of the Executives?

Kind regards,

Michael

Campaign Activity - ChannelTypeCode

$
0
0

Hello,

We only want Letter and Phone to be available Activity Types for Campaign Activity (channeltypecode). It looks like I am able to remove the other option set values, but I want to be sure I will not be breaking anything by doing so. Has anyone done this before and did you have any issues?

Thanks,

Suzy

Do I get MailBox with MS Dynamics CRM licensed account? Or Do I need to configure?

$
0
0

Hello,

I just subscribed with MS Dynamics CRM 365 with 1 year based license. I am able to login with CRM Online and get all the functionality. Now, I am trying to open Mailbox for same account on https://outlook.office365.com/. I am getting error that either I don't have Mailbox or I don't have license. As far as license concern, I am a licensed user and I have one year subscription.

Do I need to configure Mailbox from somewhere? If so, please suggest. Please review following screenshot

Default solution

$
0
0

There are two unmanaged solutions A and B, and main form of account entity is customized in both the solutions. Which unmanaged changes will be reflected in the default solution?

 

Thanks in advance.

Aks

NAV Sync with CRM 365 - How to make a GUID look up to a record.

$
0
0

Hi All,

We currently have a solution to create a quote in NAV using a GUID ID. We are then using the Std NAV connector to push the quote back to CRM. How the opportunity is still as a GUID. How can we sync the GUID and allow it too look up to an opportunity to create the relationship.

We are using 2016 versions of both systems on premise.

Thank you.

Aleia.


Inserting records with MultiSelect option records has asynchronous behavior.

$
0
0

In our unit tests we discovered the behavior that inserted records are not immediately retrievable.

This smal code leads to the following output:

    class Program
    {
        static void Main(string[] args)
        {
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            var service = new CrmServiceClient(ConfigurationManager.ConnectionStrings["MyCRMServer"].ConnectionString);

            Account test = new Account
            {
                Name = "Test",
                new_tagEnum = new[] { new_account_new_Tag.Black, new_account_new_Tag.Blue }
            };

            service.Create(test);
            var start = DateTime.Now;
            var count = 0;

            EntityCollection result = new EntityCollection();
            while (result.Entities.Count == 0)
            {
                count++;
                result = service.RetrieveMultiple(new FetchExpression(GetFetch(new_account_new_Tag.Black)));
            }

            var end = DateTime.Now;

            Console.WriteLine(count);
            Console.WriteLine(end - start);

            Console.ReadLine();

        }


        public static string GetFetch(new_account_new_Tag param)
        {
            string fetch = $@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
  <entity name='account'>
    <attribute name='name' />
    <attribute name='primarycontactid' />
    <attribute name='telephone1' />
    <attribute name='accountid' />
    <order attribute='name' descending='false' />
    <filter type='and'>
      <condition attribute='new_tag' operator='contain-values'>
        <value>{(int)param}</value>
      </condition>
    </filter>
  </entity>
</fetch>";
            return fetch;
        }
    }


That brings me to the following conclusion:
- the transaction is not finished after a successful insert.
- Up to 3 seconds elapse before the data record can be read correctly.

I executed the same code again, but with a query for the name. The result was as expected, the record was delivered immediately.
This means that only the multiselect options are normalized asynchronously.

Decompile and recompile plugin without source code

$
0
0

Hi there.
I have decompiled a Plugin.
First of all, I did it because the the developer did not give me the source codes, And even not answering me, I mean I did not do anything illegal.
The company had paid for source code, But did not get that,Anyways.
I have made a solution and include that plugin.
I could export plugin with  XrmToolBox.
I insert the exported plugin into ILSpy and I could saw the code, But can not change and deploy ( right? )
I have Visual Studio 2011, I installed Developer Tools.
I connected to the crm via VS and open that solution consist the plugin.
I can see the plugin in VS, But how can I change that?
If not possible, How can I do reveres?
I can see the codes in ILSpy, But not in the VS.
Any suggestion? Or any help?

Not able to export a view

$
0
0

Hi Guys, 

I am trying to export a view in excel but it get hung up.

This view created under Opportunity Entity where we are fetching some fields of opportunity  and Accounts Entity.

  

When I select "Open Excel in on line" i get bellow error

Log file 

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">A duplicate column heading exists.</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><ActivityId>3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</ActivityId><ErrorCode>-2147220680</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"><KeyValuePairOfstringanyType><a:key>ApiExceptionSourceKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Plugin/Microsoft.Crm.ObjectModel.ExcelService</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiOriginalExceptionKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Microsoft.Crm.CrmException: A duplicate column heading exists. ---&gt; Microsoft.Crm.CrmException: A duplicate column heading exists.
at Microsoft.Crm.ObjectModel.CrmTableAdapter.GenerateColumns()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.get_Columns()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.GenerateRows()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.get_Rows()
at Microsoft.Xrm.Office.ExcelGenerator..ctor(ISpreadsheet spreadsheet, ITemplate template, Boolean enableExcelTemplatePerfFix)
at Microsoft.Crm.ObjectModel.ExcelService.GenerateXlsx(CrmTableAdapter crmTableAdapter, ITemplate template, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.&lt;&gt;c__DisplayClass5_0.&lt;ExportToExcelInternal&gt;b__0()
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcelInternal(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcel(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.&lt;&gt;c__DisplayClass15_0.&lt;ExportToExcelOnline&gt;b__0()
at Microsoft.Crm.ObjectModel.ExcelService.ExportExcelToExcelOnline(EntityReference entityReference, String fetchXml, Func`1 generatorFunction, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcelOnline(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
--- 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.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">9edf2c3a-95f2-4d79-b623-beabe0d0d934</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiDepthKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:int">1</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiActivityIdKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiPluginSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>A duplicate column heading exists.</Message><Timestamp>2018-09-29T18:39:09.7896289Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault><ActivityId>3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</ActivityId><ErrorCode>-2147220680</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"/><Message>A duplicate column heading exists.</Message><Timestamp>2018-09-29T18:39:09.7896289Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault i:nil="true"/><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException i:nil="true"/><TraceText i:nil="true"/></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

Kindly help 

Dynamics 365 online instance setup

$
0
0

Hi Friends,

I have a question regarding the Dynamics 365 online instance setup, if we choose "None of these option" during installation does it install/configure all the required entities like Account,Case, Lead etc, what will be the difference if we select any application like sales, customer service or select none?

Select a scenario to configure your instance

Thanks,

Asad

Action Microsoft.Crm.Setup.Server.AddServerAction failed. No host is known

$
0
0

We are configuring IFD load balancing CRM for a client. During installation for both front end and back end, installation we are getting stuck at below-mentioned error

Action Microsoft.Crm.Setup.Server.AddServerAction failed. No such host is known.


Installation logs for C:\Users\<username>\AppData\Roaming\Microsoft\MSCRM\Logs

crmserversetup

11:44:27| Info| InputResult: Retry
11:44:27| Info| CrmAction execution time; AddServerAction; 00:48:42.1625793
11:44:27| Error| System.Exception: Action Microsoft.Crm.Setup.Server.AddServerAction failed. ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.InternalGetHostByAddress(IPAddress address, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at Microsoft.Crm.Setup.Shared.ADUtility.GetLongMachineName(String machine)
at Microsoft.Crm.Setup.Shared.ConfigUtility.AddServer(String sqlServer, ServerRoles roles, ServerRoles roleExclusionMask, Boolean createDatabases)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---, Error, RetryCancel, Option1

Pressing retry is of no use.

Checked the db event viewer but could not find any suitable information. Also, an earlier forum (link) asked us to check OU "Needed to have organizational unit and security group creation permission in Active Directory." that as per client our user have it.

Viewing all 46379 articles
Browse latest View live


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