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

Apply Solution Upgrade Failed - CRM 2016

$
0
0

Hi all,

I would like ask something to this community forum.

I got this error while click "Apply Solution Upgrade" on CRM 2016.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Crm Internal Exception: Singleton Retrieve Query should not return more than 1 record. Query: System.Data.SqlClient.SqlCommandDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220913</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>CallStack</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string"> at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action)
at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.MessageProcessor.&lt;&gt;c__DisplayClass1.&lt;RunStage&gt;b__0()
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action)
at Microsoft.Crm.Extensibility.MessageProcessor.RunStage(PipelineExecutionContext context, Int32 pipelineStage)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode, Object operation, UserType targetUserType)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Crm Internal Exception: Singleton Retrieve Query should not return more than 1 record. Query: System.Data.SqlClient.SqlCommand</Message>
<Timestamp>2016-10-17T08:27:58.6286999Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>


What is the purpose of post image in ms crm plugin ?

$
0
0

plugin registered on post entity image, how is it different from context information ?

Incoming Email has 'script' warning in CRM

$
0
0

Is anybody facing this below issue after CRM 2016 SP1 update ?

Whenever a CRM contact or external party sends a email to CRM User or Queue. CRM adds an incoming email activity with this message in red "The email below might contain script or content that is potentially harmful and has been blocked."

We didnt have this issue before the update. "I hate when Microsoft introduces new bugs in their updates".



The email with green outline is an outgoing email to a queue in CRM, red is system created.

Any possible solution?

Active directory Synchronization with On premise CRM 2013

$
0
0

Is it possible to sync the Active Directory with Microsoft Dynamics On premise CRM Account 2013 Without Office 365 Subscription?

Show record details on mousehover of look up

$
0
0

Hi,

I wanna show a pop up of record details on look up control mousehover.

For example: I have customer lookup on case entity, on mousehover of customer lookup, i wanna show first name, phone number etc.. as a poop up.

I know this is not possible in OOB, can anyone help me with unsupported code.

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

$
0
0

I have two fields avd_starttime and avd_stoptime. I am writing the below code to update the avd_stoptime field with datetime.now. But I am getting the error as "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."..PLease tell me where I am going wrong??

 internal static bool StopAht(ICrmContext context)
        {
            QueryExpression exp = new QueryExpression(avd_agenthandlingtime.EntityLogicalName);
            exp.NoLock = true;
            exp.ColumnSet.AddColumn(XrmAttributes.AgentHandlingTime.Id);
            exp.ColumnSet.AddColumn(XrmAttributes.AgentHandlingTime.StopTime);

            ConditionExpression CondOppId = new ConditionExpression();
            CondOppId.AttributeName = "avd_StopTime";
            CondOppId.Operator = ConditionOperator.Null;


           

            string timerId = XrmAttributes.AgentHandlingTime.Id;

            var coll = context.OrganizationService.RetrieveMultiple(exp);
            if (coll != null && coll.Entities != null && coll.Entities.Count > 0)
            {
                foreach (var ent in coll.Entities)
                {
                    avd_agenthandlingtime stopTimer = new avd_agenthandlingtime()
                    {
                        Id = new Guid(timerId),
                        avd_StopTime = DateTime.Now
                    };
                    context.AdminUpdate(stopTimer);


                }
            }
            return true;
        }

The name 'WebAuthenticationBroker' does not exist in the current context

$
0
0

The Obtain the redirect URI section tells:

execute the following line of code in a debug session

string redirectUri = WebAuthenticationBroker.GetCurrentApplicationCallbackUri().ToString();

for getting the redirect URI.

  • We've got the Web API Helper Code:

Web API Helper Code

The Web API Helper Code Nuget package dependency is installed

Web API Helper Code package

The error in a debug session is:

The name 'WebAuthenticationBroker' does not exist in the current context

The name 'WebAuthenticationBroker' does not exist in the current context

Found that it can be found in the Windows.Security.Authentication.Web namespace. Upon investigating the related thread, found that Microsoft.Preview.WindowsAzure.ActiveDirectory.Authentication & Microsoft.IdentityModel.Clients.ActiveDirectory packages are required. The latter requires .NET core, hence setting up the same.

Have anyone been successful in getting the Dynamics CRM Redirect URI?

Populate an option set when date field is populated.

$
0
0

I wonder if someone could help.

I have a datefield on a contact form which is stated as Birthday (schema: "birthdate") in MSD 2015

When the date field is populated with the contacts birthday, i have an option set with all the months of the year in the pick list.

So i want the month in the date field to populate the option set with the correct month.

i.e. - Birthday: 01/01/1987 (Date field)

- Birthday Month: January (option set)

Can anyone help me with a Jscript as mine does not seem to be working.

Thanks


Error save crm 2015 form using plugin

$
0
0

Hi,

I wrote  a plugin to save more than one firm in one form. When user selects 3 firms , in databae 3 rows added according to the firm information. But some fields should be sam such as fatura no, fatura tarihi etc. Only firm (mağaza) ids , marka (brand number) should be different; the other infos are same.

If i want to save one firm, it will be easy to save.(teh original form was made to save one firm and infos about it). But the companuy wants me to to in this form to save more than one firm with ists info. Since i wrote the plugin. It gives me error: Specified cast is not valid.

Her is the eror log:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: ERROR: message:Specified cast is not valid.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>ERROR: message:Specified cast is not valid.</Message>
<Timestamp>2016-10-17T11:41:54.5480695Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>

[CheckboxMagazaKaydet: CheckboxMagazaKaydet.MyPlugin]
[6bc53568-5b94-e611-80d8-0050569f563c: CheckboxMagazaKaydet.MyPlugin: Create of new_destek_yerelreklam_detay]


</TraceText>
</OrganizationServiceFault>

Here is my form:

and here is my plugin code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;

namespace CheckboxMagazaKaydet
{
// Bu plugin yerle rekalm desteğinde birden fazla mağaza seçildiğinde mağazaları ve verilerini kaydeder.
public class MyPlugin : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if ("Create,Update".Contains(context.MessageName) == false) return;
if (!context.InputParameters.Contains("Target") || (context.InputParameters["Target"] is Entity) == false) return;
Entity entity = (Entity)context.InputParameters["Target"];

try
{
var factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
var service = factory.CreateOrganizationService(context.UserId);

#region Yerel Reklam Desteği
if (entity.LogicalName == "new_destek_yerelreklam_detay")
{

//The brands of the firms
string markalar = entity.Contains("new_marka") ? entity["new_marka"].ToString() : "";

string[] marka = markalar.Split(',');
for (int j = 0; j < marka.Length; j++)
{
marka[j] = marka[j].Trim();
}

//The ids of the firms
string ids = entity.Contains("new_ids") ? entity["new_ids"].ToString() : "";

string[] id = ids.Split(',');
for (int k = 0; k < id.Length; k++)
{
id[k] = id[k].Trim();
}



string magazalar = entity.Contains("new_multiline") ? entity["new_multiline"].ToString() : "";

string[] magaza = magazalar.Split(',');
for (int i = 0; i < magaza.Length; i++)//It loops in new_multiline textare according to thenumber of firms
{
magaza[i] = magaza[i].Trim();

entity["new_magaza"] = id[i];


Decimal tutar = (Decimal)entity.Attributes["new_tutar"];
tutar = tutar / (i);

int faturano = (int)entity.Attributes["new_faturano"];

DateTime faturatarihi = (DateTime)entity.Attributes["new_faturatarihi"];
string donem = (string)entity.Attributes["new_donem"];


entity["new_marka"] = marka[i];


entity.Attributes["new_tutar"] = tutar;
entity.Attributes["new_faturano"] = faturano;
entity.Attributes["new_faturatarihi"] = faturatarihi;
entity.Attributes["new_donem"] = donem;


service.Create(entity);


}

}

#endregion

}
catch (Exception ex)
{
Exception e = ex.InnerException != null ? ex.InnerException : ex;
throw new InvalidPluginExecutionException(string.Format("ERROR: message:{0}", e.Message));
}

Dynamics CRM Online > Exchange on-Premise & Exchange Online

$
0
0

Hi,

Is it possible to have a configuration where 50% of users are using Exchange On-Premise and the other 50% Exchange Online?

When setting up the Exchange Server Profile with the Impersonation User, do you then specify the individual mailbox addresses in the queues / Users you want to use from Exchange Server?

e.g. Email Server Profile = xyz@contsoso.com (impersonation user)


Queue 1 = Email: zzz@contoso.com

User 1 = Email: yyy@contoso.com

and all you do is use the credentials specified in the emails server profile?

Collapse Account Custom Tab Not Working

$
0
0

Only one custom tab is not collapsing even though I have setup the tab settings to not expand it by default. What else should I consider in pursuit of the tab to be not collapsed by default?

Thanks

Junior Consultant

Data Segregation

$
0
0

Hi All

I am looking to create 2 business units in CRM 2016 to be able to segregate. I am looking to do the following:

1. Create 2 Business units named A and B

2 I will have users in Business Unit A and these users should not be able to see what data is in Business unit B and as for users in business unit B these users can see across all business units.

so in the event that contacts owned by users in Business unit A are marketed to by users in Business unit A express interest in newsletters from Business Unit B and if users from Business unit B send the marketing communication to contacts owned by Users in Business Unit A.

Is there a way to stop users from Business Unit A seeing marketing communication sent to contacts they own sent by users in Business unit B

Any ideas and solutions welcome

CRM Connections

$
0
0

Does Creating a connection between a record and a User automatically share the record with the User?

I just tried and found that this is happening not sure it is as per OOB CRM - Since I could not find an msdn article that explicitly mentions about this behavior.

 

Can you please confirm this.

Command Bars not shown in language code 1031

$
0
0

Hello everybody

I have two user which both are System administrator. one has english and the other has german set as language.
If I go to products and families the english one has the command bar button "add product", "add family" etc. but the german one doesn't. All the labels are translated. there are no display rules. The system language is english.

Does anyone have an idea what's happening?

best regards,

lorenz

Customising Portal (css, web templates) - Cache Not Invalidating

$
0
0

We are trying to demo the portal to a customer.

Part of the demo will involve customising the look and feel of the portal meaning we need to tweak css files that exist as web files in CRM and also possibly tweak some of the web template records in CRM (add customer specific logos, fonts etc etc).


However, when we make changes to the css files/web templates in CRM - we still get the old values out on the portal, even if we manually invalidate the cache (using portalurl/cache.axd?message=invalidateall).

Is there a new method of invalidating the cache now?

If not - what could be causing these delays? We are talking hours here not seconds or even minutes.

We cannot possibly use the portal if there is no way for a developer to customise quickly.

Any thoughts on how to do this?

Thanks


where is OnReadyStateComplete?

Due date task is limited to 24 month in a workflow

$
0
0

Hello,

I created a workflow running when the status reason of my order process has the value "Complete".

Then, this workflow create a follow up task and I want that the due date of this task is set to 7 years after the status change.

But the maximum I can choose is 24 month in the combo box !

How can I automatically create a record with a due date bigger than 2 years ?

Thank you in advance for your answers.

Dependent OptionSet in CRM 2016 online

$
0
0

Hi,

I have encountered some problems when I'm trying to create a dependent option set in CRM 2016 (online) in the account entity. Hopefully someone understands what I'm doing wrong.

I have followed this instruction https://msdn.microsoft.com/en-us/library/gg594433(v=crm.8).aspx

Categories:
Category1 (value 11)
Category2 (value 3)

Subcategories
Option1 (value 100000000)
Option2 (value 100000001)
Option3 (value 100000002)
Option4 (value 100000003)
Option5 (value 100000004)
Option6 (value 100000005)
Option7 (value 100000006)
Option8 (value 100000007)
Option9 (value 100000008)
Option10 (value 100000009)

1. In the web resource I created a JavaScript with the name new_sample_TicketDependentOptionSetConfig.js

[
{
"parent": "customertypecode",
"child": "new_classid",
"options": {
"11": [
"100000000",
"100000001",
"100000002",
"100000003",
"100000004"
],

"3": [
"100000005",
"100000006",
"100000007",
"100000008",
"100000009"
]


}
}
]

2. And I copied the code from msdn.microsoft.com for my second web resource sample_SDK.DependentOptionSetSample.js

3. In the form properties I added the web resource to the library

4. In the first option set "CustomerTypeCode" in the form I added following information.

I have pressed published customization, but nothing happens when I try it out in the account entity.

If anyone knows what the problem is, please let me know.
Thanks

Olivia

How to set default Queue Lookup view from "Business Queue" to another public view?

$
0
0

In Dynamics 2013 (6.1) when we try to route queue items we will get "Business Queues" as the default Lookup view. Is there any supported way to customise this default 'Business Queues' lookup view to point to different public view. From the user perspective, It is a pain to go through and change the defaulted view(Business Queues) to a different view every time.

Also I have done some investigation on the above query but can't find the solution. Could someone please suggest. Many thanks in advance.

Week Number incorrect in CRM in Calculation of week

$
0
0

Hello,

I am working on CRM 2016 Online update 1 application .

I have a chart which shows number of open leads per week. 

The leads created today 17/10/2016, it should be present in week  42 (real calendar), as we are in the 42nd week of the year, but in the CRM it show always one week extra, so week 43rd  for leads created today.

Any settings which i need to do by going in System Settings -> Formats->Date -> First day of week , First week of year ??? 

Viewing all 46379 articles
Browse latest View live


Latest Images