Unexpected behaviour in MS CRM 2013
Hi,
In MS CRM 2013 contacts form I am facing an issue. For some records the tab heading is having an underline. This is happening only for some records, not for all. Also the issue is in IE 9, for IE 11 its working fine. Can anyone suggest a solution for this.
Hi,
Found following articles which has steps and code for this.
http://xrmguy.com/2014/03/03/crm-2013-make-all-controls-including-subgrids-disabled-onload/
https://kishored4.wordpress.com/2014/06/04/ms-dynamics-crm-2013-disable-the-icon-on-sub-grid-based-on-status-reason/
Hope this helps.
Minal Dahiya
blog : http://minaldahiya.blogspot.com.au/
If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"
Similar Messages
-
CRM 2013 error when adding a new appointment in Outlook.
When added
NEW DEADLINE The outlook on the calendar, I received an
error in CRM.
/////ERROR//////////////////////////////////////////////////////////////////////////////////////////
[2015-03-05 09:20:34.403] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread: 28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor
ilOffset = 0x7
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
at CrmException..ctor(String message, Int32 errorCode) ilOffset = 0x5
at SecurityLibrary.RetrievePrivilegeForUser(IUser user, Guid privilege, ExecutionContext context) ilOffset = 0x14B
at SecurityLibrary.TryCheckPrivilege(Guid user, Guid privilege, ExecutionContext context) ilOffset = 0x3D
at SecurityLibrary.TryCheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context) ilOffset = 0x42
at SecurityLibrary.CheckPrivilege(SecurityPrincipal principal, Guid privilege, ExecutionContext context) ilOffset = 0x0
at AddressManager.GetOwnerCandidate(AddressEntry addressEntry) ilOffset = 0x50
at AddressResolver.BuildResolvedAddressEntry(AddressCategory category, BusinessEntity businessEntity, Guid& objectId, Boolean active, String emailAddressMatched) ilOffset = 0x58
at AddressResolver.GetPrunedList(BusinessEntityCollection responseCollection, AddressCategory category, Hashtable removeDuplicateFilter) ilOffset = 0x6B
at AddressResolver.DoResolve(AddressEntry[] addressEntriesToResolve, Int32[] objectTypes, Boolean matchPartialEmailAddresses) ilOffset = 0x70
at AddressManager.ResolveEmailAddressInternalHelper(String emailAddresses, Int32[] objectTypeCodes) ilOffset = 0x1F
at CommunicationActivityServiceBase.ResolveUnresolvedParties(BusinessEntityCollection parties, Int32[] objectTypes, ExecutionContext context) ilOffset = 0x5C
at AppointmentService.Book(BusinessEntity entity, ExecutionContext context) ilOffset = 0x3D
at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xCF
at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x6C
at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
at 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 transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
at OrganizationSdkService.Execute(OrganizationRequest request) ilOffset = 0xD
at ilOffset = 0xFFFFFFFF
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) ilOffset = 0x241
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) ilOffset = 0x100
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) ilOffset = 0x48
at MessageRpc.Process(Boolean isOperationContextSet) ilOffset = 0x62
at Wrapper.Resume(Boolean& alreadyResumedNoLock) ilOffset = 0x1B
at ThreadBehavior.SynchronizationContextStartCallback(Object state) ilOffset = 0x0
at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x70
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x4
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ilOffset = 0x0
at ThreadPoolWorkQueue.Dispatch() ilOffset = 0xA3
>Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
[2015-03-05 09:20:34.572] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread: 28 |Category: Platform.Sdk |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | VersionedPluginProxyStepBase.Execute
ilOffset = 0x65
>Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.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.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
at System.Globalization.CultureInfo..ctor(Int32 culture)
at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
[2015-03-05 09:20:34.579] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread: 28 |Category: Exception |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | CrmException..ctor
ilOffset = 0x7
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xB
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x6C
at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
at 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 transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean
returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
at OrganizationSdkService.Execute(OrganizationRequest request) ilOffset = 0xD
at ilOffset = 0xFFFFFFFF
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) ilOffset = 0x241
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) ilOffset = 0x100
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) ilOffset = 0x48
at MessageRpc.Process(Boolean isOperationContextSet) ilOffset = 0x62
at Wrapper.Resume(Boolean& alreadyResumedNoLock) ilOffset = 0x1B
at ThreadBehavior.SynchronizationContextStartCallback(Object state) ilOffset = 0x0
at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x70
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x4
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ilOffset = 0x0
at ThreadPoolWorkQueue.Dispatch() ilOffset = 0xA3
>Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
at System.Globalization.CultureInfo..ctor(Int32 culture)
at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
[2015-03-05 09:20:34.580] Process: w3wp |Organization:b5eb04f5-c174-e411-8f8d-0019990163cf |Thread: 28 |Category: Platform |User: 04b7d2dc-0428-e211-8585-000c29667e7c |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | MessageProcessor.Execute
ilOffset = 0x1C5
>MessageProcessor fail to process message 'Book' for 'appointment'.
[2015-03-05 09:20:34.581] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertToFault
ilOffset = 0x69
>UNEXPECTED: no fault?
[2015-03-05 09:20:34.582] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 28 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 8b0e1332-9d32-456b-b953-aa5bfc9c1912 | ExceptionConverter.ConvertMessageAndErrorCode
ilOffset = 0x23B
>System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
>Parameter name: culture
>0 (0x0000) is an invalid culture identifier.
> at System.Globalization.CultureInfo.InitializeFromCultureId(Int32 culture, Boolean useUserOverride)
> at System.Globalization.CultureInfo..ctor(Int32 culture)
> at Microsoft.Crm.Common.BusinessEntities.AppointmentConflictNotificationGenerator.AddNotifications(NotificationAdder notifications, ErrorInfo[] errorInfoArray, CrmResourceManager crmResourceManager, IOrganizationContext context)
> at Microsoft.Crm.Common.ObjectModel.AppointmentService.Book(BusinessEntity entity, ExecutionContext context)
/////END ERROR//////////////////////////////////////////////////////////////////////////////////////////
And then the
date of the duplicates in the calendar
in Outlook and CRM.
My version CRM 2013 -
6.1.2.112
Crm2013wasthemigratedfromthe
2011 version.
Does anyone have any idea how to
solve it.I checked it, these errors
occur on all users. Below
the main errors that occur.
Crm Exception: Message: SecLib::RetrievePrivilegeForUser failed - no roles are assigned to user. Returned hr = -2147209463, User: ed2ef8c8-69db-e311-9816-0019990163cf, ErrorCode: -2147209463
Web Service Plug-in failed in SdkMessageProcessingStepId: {E4C9BB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: appointment; Stage: 30; MessageName: Book; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=6.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.
Inner Exception: System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
MessageProcessor fail to process message 'Book' for 'appointment'.
System.Globalization.CultureNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #895E889A: System.Globalization.CultureNotFoundException: Culture is not supported.
>Parameter name: culture
>0 (0x0000) is an invalid culture identifier. -
Hi
We have a test install of CRM 2013 which is working correctly on the server. Logon via the web is ok.
A user was setup to access through the outlook client in office13 running on a win7 platform which also worked correctly. The same user also has secondary access through the outlook client in office 13 running on a win8.1 platform. This never worked correctly
and would show credential errors.
Recently the win7 platform has also disconnected and shows connection errors.
I have tried the following on the win 7 platform:
1. Uninstall the client and reinstall from scratch - unsuccessful
2. Run through the steps in the built in trouble shooter - unsuccessful
Logon using the same creds via the web on the same machine is ok!
What are the next steps to rectify this problem?
Thanks in advance!Hi Melon,
here is the full error message and a copy of the log file is given below.
17:50:49| Info| === Microsoft Dynamics CRM for Outlook Configuration Wizard logging started: 24/03/2014 5:50:48 PM ===
17:50:49|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ClientConfig.Initialize
17:50:49| Info| Client Configuration Wizard Version : 6.0.0001.0061
17:50:49| Info| Client Configuration Wizard LanguageID : 1033
17:50:49|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.Validator.IsOutlookInitialized
17:50:49| Info| Query all rows in profile table
17:50:49| Info| Outlook is initialized
17:50:49|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.Validator.IsOutlookInitialized
17:50:49| Info| Client Configuration Wizard Running Mode : Normal
17:50:52| Info| Configuration file Type : OnPremise.
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.ConfigInfo
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetAllCRMOrgsInOutlookProfile
17:50:52| Info| Logon mapi store
17:50:52| Info| Logon admin service
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetServiceIds
17:50:52| Info| Query all rows in msg service table
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetServiceIds
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.CleanUpDatastoreIfNeeded
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.CleanUpDatastoreIfNeeded
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.ConfigInfo
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.ServerForm
17:50:54|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.ServerForm
17:50:54|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.SetUIData
17:50:54|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadAvailableUrls
17:50:55|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadAvailableUrls
17:50:55|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.SetUIData
17:51:03|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:03|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:03|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:03|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:30| Info| Fill organization comboBox with server information.
17:51:35|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:35|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:35|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:35|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:36| Info| Fill organization comboBox with server information.
17:51:37|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._okButton_Click
17:51:37|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._okButton_Click
17:51:40| Error| Exception : Metadata contains a reference that cannot be resolved: 'https://ldp-crm-01:80/LDP/XRMServices/2011/Organization.svc?wsdl'. at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper
timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProvider(Uri endPoint, Credential credentials, AuthUIMode uiMode, Uri webEndPoint, IClientOrganizationContext context, Form parentWindow)
at Microsoft.Crm.Application.Outlook.Config.ServerInfo.LoadUserId()
at Microsoft.Crm.Application.Outlook.Config.ServerInfo.Initialize(Uri discoveryUri, OrganizationDetail selectedOrg, String displayName, Boolean isPrimary)
at Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadDataToServerInfo()
at Microsoft.Crm.Application.Outlook.Config.ServerForm.<InitializeBackgroundWorkers>b__2(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
17:51:40| Error| Exception : The underlying connection was closed: An unexpected error occurred on a send. at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
Look forward to hearing from you,
Thanks -
Whole number field formatted as timezone in CRM 2013 SP1UR1 gives error on saving
Hi,
I added a whole number field formatted as time zone to the appointment form and when I save the record I get an error saying
Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.IConvertible'.
This error is coming from the timezone field and only happens when I have data in the field. Has anyone seen this?
Thanks
Rickard Norström Developer CRM-Konsulterna
http://www.crmkonsulterna.se
Swedish Dynamics CRM Forum: http://www.crmforum.se
My Blog: http://rickardnorstrom.blogspot.seMore info, the error occurs on pipeline stage 30 of the Book or Reschedule message and the same thing happens in CRM 2015. I've started a thread on connect with URL
https://connect.microsoft.com/dynamicssuggestions/feedback/details/1128206/crm-2013-sp1ur1-cant-handle-the-timezone-field
This must be rather new because I've tried it in CRM 2011 UR late and it did not occur there, I haven't tried CRM 2013 RTM though so I can't say if it's a CRM 2013 or a CRM 2013 SP1UR1 issue.
BTW, the 2015 org was a complete vanilla so I've pretty much ruled out custom code as a culprit :)
Regards
Rickard Norström Developer CRM-Konsulterna
http://www.crmkonsulterna.se
Swedish Dynamics CRM Forum: http://www.crmforum.se
My Blog: http://rickardnorstrom.blogspot.se -
CRM 2013 - Internal query related to fetching top 51 emails
Hello All,
We have recently upgraded from CRM 4 to CRM 2013. We are monitoring database server performance through one of the tool. We find that following internal query getting executed more frequently during initial business hours.
(@ModifiedOn0 datetime,@PartyId0 uniqueidentifier)
SELECT DISTINCT top 51 "email0".ModifiedOn as "modifiedon" , "email0".MessageId as "messageid" , "email0".ActivityId as "activityid" , "email0".RegardingObjectId
as "regardingobjectid" , "email0".Subject as "subject" , "email0".RegardingObjectIdYomiName as "regardingobjectidyominame" , "email0".RegardingObjectIdName
as "regardingobjectidname" , "email0".RegardingObjectTypeCode as "regardingobjecttypecode"
FROM Email as "email0" JOIN ActivityParty as "activityparty1" ON ("email0".ActivityId = "activityparty1".ActivityId
AND (("activityparty1".PartyId = @PartyId0)))
WHERE (( "email0".ModifiedOn >= @ModifiedOn0
AND "email0".MessageId is not null))
ORDER BY "email0".MessageId asc ,
"email0".ActivityId asc
I found following useful blog which mentions the reason of frequent execution of this query.
https://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2012/10/11/crm-e-mail-tracking-part-3-tagging.aspx
My question is,
1) What will be impact if we disable email tagging option from all users? Note that, We are not using email router in our implementation.
2) Will this query executes frequently during normal business hours also? If yes, then do we have any settings to change interval of execution of this process?Hi ,
Try to deactivate the Automatic E-Mail Tagging from Diagnostic Tool and observer the behaviour.
If it still trigger then better to look for other areas.
Regards
Ayaz -
Unexpected behaviour of Composer with adf-config
This is a part of my adf-config.xml file:
<cust:customizableComponentsSecurity xmlns="http://xmlns.oracle.com/adf/faces/customizable/config">
<cust:enableSecurity value="true"/>
<cust:actionsCategory>
<cust:actionCategory name="personalizeActionsCategory" value="#{securityContext.userName eq 'weblogic' ? 'true' : 'false'}"/>
<cust:actionCategory name="customizeActionsCategory" value="#{securityContext.userName eq 'weblogic' ? 'true' : 'false'}"/>
</cust:actionsCategory>
</cust:customizableComponentsSecurity>
Section upon sets a simple EL to provide security restrictions for user in Composer. When I deploy an application and login at first time everything works fine. But when I log in with user other than 'weblogic' unexpected behaviour appears. After that even 'weblogic' user can not access to personalization and customization options anymore.
So, the question is - is it a really unexpected behaviour, bug or I missed something? Here is a pretty clear and simple manual that I followed to try to make it work: http://docs.oracle.com/cd/E29597_01/webcenter.1111/e25595/jpsdg_page_editor_security.htm#autoId18
Edited by: Igor_Petrov on 22.02.2013 5:56
Edited by: Igor_Petrov on 22.02.2013 5:57More information: I tried rebuild again. The Messages folder now has 20418 entries and takes 7.54 Gb of disk space.
I searched using Spotlight for a unique term which appears in one of the messages and found 8 instances of it. All are the same message, but are separate .emlx files.
This is getting crazy ... -
Dynamic CRM 2013 Online how to execute Report, generate PDF and email
Dear All,
I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
quote form.
I am using the attached code, but facing various issues.
1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var Xrm;
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
function getReportingSession() {
var reportName = "Quotation_Report"; //set this to the report you are trying to download
var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var recordid = Xrm.Page.data.entity.getId();
// recordid = recordid.substring(1, 37); //getting rid of curly brackets
alert(recordid);
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
function createEntity(ent, entName, upd) {
var jsonEntity = JSON.stringify(ent);
var createEntityReq = new XMLHttpRequest();
var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
createEntityReq.setRequestHeader("Accept", "application/json");
createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
createEntityReq.send(jsonEntity);
var newEntity = JSON.parse(createEntityReq.responseText).d;
alert("new entity" + newEntity);
return newEntity;
function createAttachment() {
var params = getReportingSession();
var recordid = Xrm.Page.data.entity.getId();
alert("recordid " + recordid);
var orgName = Xrm.Page.context.getOrgUniqueName();
var userID = Xrm.Page.context.getUserId();
//create email record
// Prepare the SOAP message.
var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
"<soap:Header>" +
"</soap:Header>" +
"<soap:Body>" +
"<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
"<entity xsi:type='email'>" +
"<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
"<subject>" + "Email with Attachment4" + "</subject>" +
"</entity>" +
"</Create>" +
"</soap:Body>" +
"</soap:Envelope>";
// Prepare the xmlHttpObject and send the request.
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);
xHReq.send(xml);
// Capture the result
var resultXml = xHReq.responseXML;
// alert("resultXml " + resultXml);
// Check for errors.
var errorCount = resultXml.selectNodes('//error').length;
if (errorCount != 0) {
alert("ERROR");
var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
alert(msg);
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
//var emailid = userID;
var post = Object();
post.Body = encodePdf(params);
var email = new Array();
email[0] =new Object();
email[0].id = emailid;
email[0].entityType ='email';
post.Subject ="File Attachment";
post.AttachmentNumber = 1;
post.FileName ="Report.pdf";
post.MimeType ="application/pdf";
post.ObjectId = Object();
post.ObjectId.LogicalName ="email";
post.ObjectId.Id = email[0].id;
post.ObjectTypeCode ="email";
alert(post.ObjectId.Id);
createEntity(post,"ActivityMimeAttachment", "");
alert("created successfully");
email.Subject = "Your Order";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: customerId, // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerId, // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
</SCRIPT>
<SCRIPT type=text/vbscript>
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</SCRIPT>
</head>
<body>
<input type="button" onclick="createAttachment();" value="Attach Report" />
</body>
</html>
Thanks. and waiting for your valuable comments.
- MittalHello,
Yes, I was able to make my code working as below. Tested on CRM online 2013.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
if (typeof (SDK) == "undefined")
{ SDK = { __namespace: true }; }
SDK.JScriptRESTDataOperations = {
_context: function () {
if (typeof GetGlobalContext != "undefined")
{ return GetGlobalContext(); }
else {
if (typeof Xrm != "undefined") {
return Xrm.Page.context;
else { return new Error("Context is not available."); }
_getServerUrl: function () {
var serverUrl = this._context().getServerUrl()
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
return serverUrl;
_ODataPath: function () {
return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
_errorHandler: function (req) {
return new Error("Error : " +
req.status + ": " +
req.statusText + ": " +
JSON.parse(req.responseText).error.message.value);
_dateReviver: function (key, value) {
var a;
if (typeof value === 'string') {
a = /Date\(([-+]?\d+)\)/.exec(value);
if (a) {
return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
return value;
Create: function (object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 201) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Retrieve: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
Update: function (id, object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "MERGE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Delete: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "DELETE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
if (filter != null) {
filter = "?" + filter;
else { filter = ""; }
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set" + filter, true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
__namespace: true
</script>
<script type="text/javascript">
//Create Email and link it with Order as Regarding field
var Xrm;
var email = new Object();
var ownerID = "";
var CustomerId = "";
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
//Get ownerid who send email of quotation to customer
function GetOwnerID() {
var owner = Xrm.Page.getAttribute("ownerid").getValue();
ownerID = owner[0].id;
var ownerName = owner[0].name;
var entityType = owner[0].entityType;
GetToEmailGUID();
//Get customerid who receive email of quotation from owner
function GetToEmailGUID() {
var Customer = Xrm.Page.getAttribute('customerid').getValue();
CustomerId = Customer[0].id;
var CustomerName = Customer[0].name;
var entityType = Customer[0].entityType;
//if CustomerId is type of "Account" then get Primary Contact id of that account
if (entityType == "account") {
var contact = Xrm.Page.getAttribute("customerid").getValue();
if (contact === null) return;
var serverUrl = Xrm.Page.context.getClientUrl();
var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
var req = new XMLHttpRequest();
req.open("GET", oDataSelect, false);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
req.onreadystatechange = function () {
if (req.readyState === 4) {
if (req.status === 200) {
var retrieved = JSON.parse(req.responseText).d;
CustomerId = retrieved.PrimaryContactId.Id;
else {
alert(this.statusText);
req.send();
function CreateEmail() {
GetOwnerID();
email.Subject = "Email with Report Attachment";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
GetReportId('Quotation');
//Create attachment for the created email
function CreateEmailAttachment() {
//get reporting session and use the params to convert a report in PDF
var params = getReportingSession();
//Email attachment parameters
var activitymimeattachment = Object();
activitymimeattachment.ObjectId = Object();
activitymimeattachment.ObjectId.LogicalName = "email";
activitymimeattachment.ObjectId.Id = email.ActivityId;
activitymimeattachment.ObjectTypeCode = "email",
activitymimeattachment.Subject = "File Attachment";
activitymimeattachment.Body = encodePdf(params);
activitymimeattachment.FileName = "Report.pdf";
activitymimeattachment.MimeType = "application/pdf";
//Attachment call
SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
//ActivityMimeAttachment CallBack function
function ActivityMimeAttachmentCallBack(result) {
var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
var width = "800px";
var height = "600px";
window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
// To open window which works in outlook and IE both
//openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
//This method will get the reportId based on a report name that will be used in getReportingSession() function
function GetReportId(reportName) {
var oDataSetName = "ReportSet";
var columns = "ReportId";
var filter = "Name eq '" + reportName + "'";
retrieveMultiple(oDataSetName, columns, filter, onSuccess);
function retrieveMultiple(odataSetName, select, filter, successCallback) {
var serverUrl = Xrm.Page.context.getServerUrl();
var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
if (select) {
odataUri += "$select=" + select + "&";
if (filter) {
odataUri += "$filter=" + filter;
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataUri,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
success: function (data) {
if (successCallback) {
if (data && data.d && data.d.results) {
successCallback(data.d.results);
else if (data && data.d) {
successCallback(data.d);
else {
successCallback(data);
error: function (XmlHttpRequest, errorThrown) {
if (XmlHttpRequest && XmlHttpRequest.responseText) {
alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
function onSuccess(data) {
reportId = data[0].ReportId.replace('{', ").replace('}', ");
CreateEmailAttachment(); // Create Email Attachment
//Gets the report contents
function getReportingSession() {
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
var Id = Xrm.Page.data.entity.getId();
var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
quotationGUID = quotationGUID.replace('}', "");
var reportName = "Quotation"; //set this to the report you are trying to download
var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var rptPathString = ""; //set this to the CRMF_Filtered parameter
var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
//remove the part starting from &p:salesorderid if your report has no parameters
retrieveEntityReq.send(rptPathString);
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
"&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
"&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
</script>
<script type="text/vbscript">
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</script>
</head>
<body>
<input type="button" onclick="CreateEmail();" value="Attach Report" />
</body>
</html>
Thank you,
Mittal. -
Save and Close button issue in CRM 2013 for Activity Type Appointment
Hi All,
Have come across a strange behavior in CRM 2013 and would like to be sure that it really is an issue which others have encountered too.
Open a Case record, and click on Activity navigation link to see the Open Activity Associated View. Then try creating an Activity of type Meeting and click on
Save & Close button (not just Save). When you refresh the view, the activity might show up. But repeat the same steps and create another Activity of Type Meeting and this activity will not show up. It doesnt show up even in the All Activities
view. Seems like the activity does not get created when using Save and Close button.
This behavior is replicated even on online 30 day trial version. Any inputs?
Regards,
YogeshThe problem only occurs when your appointment times clash. "Save and close" just throws the appointment away. "Save" tells you about clash (or perhaps it's just unavailability) and allows you to ignore and continue with the
save. -
CRM 2013 - Inconsistent javascript issue crash the web client and user needs to reopen
Hello,
We are using CRM 2013 on premise version and almost 600 users are using it. We have some inconsistent JavaScript issue (following is the log for same) which happens to users in a day or two. When this issue occurs user can not work in system and they have
to open new instance of CRM.
Does anybody knows about this error?
<CrmScriptErrorReport>
<ReportVersion>1.0</ReportVersion>
<ScriptErrorDetails>
<Message>Unable to get property 'location' of undefined or null reference</Message>
<Line>1</Line>
<URL>/_static/_common/scripts/main.js?ver=1676323357</URL>
<PageURL>/main.aspx#313155368</PageURL>
<Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe</Function>
<CallStack>
<Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe";addPassiveAuthParameters($p0);var$v_0=$p0.toString();if(IsNull($p2))$p2=false;var$v_1=this.$18_3($p0,$p2);if($v_1){if(this.$2z_3()){window.location.reload();return}this.$2d_3();this.$1s_3();Mscrm.PerformanceTracing.write("Navigate",$v_0);!Mscrm.Utilities.isIE()&&this.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);this.$3_3.get_currentIFrame().contentWindow.location.replace($v_0)}else{this.$10_3();var$v_2=this.get_contentWindow().Sys.Application.findComponent("crmPageManager");if($v_2){!Mscrm.Utilities.isIE()&&$v_2.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);var$v_3={};$v_3["sourceUri"]=Mscrm.Utilities.getContentUrl(null);$v_2.raiseEvent(Mscrm.ScriptEvents.IFrameReactivated,$v_3)}}window.self.InnerIFrameSrcChangeTimestamp=(newDate).getTime();this.title=$p1;if(window.LOCID_UI_DIR==="RTL"&&$p0.toString().indexOf("PersonalWall")>=0&&window.UseTabletExperience)this.$3_3.get_currentIFrame().style.position="RELATIVE"}</Function>
</CallStack>
</ScriptErrorDetails>
<ClientInformation>
<BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)</BrowserUserAgent>
<BrowserLanguage>en-US</BrowserLanguage>
<SystemLanguage>en-US</SystemLanguage>
<UserLanguage>en-US</UserLanguage>
<ScreenResolution>1366x768</ScreenResolution>
<ClientName>Web</ClientName>
<ClientTime>2015-04-20T15:41:12</ClientTime>
</ClientInformation>
<ServerInformation>
<OrgLanguage>1033</OrgLanguage>
<OrgCulture>1033</OrgCulture>
<UserLanguage>1033</UserLanguage>
<UserCulture>1033</UserCulture>
<OrgID>{E8BBA7AE-A552-DE11-B475-001E0B4882E2}</OrgID>
<UserID>{614837CD-448B-DE11-A5E1-005056970D6C}</UserID>
<CRMVersion>6.1.2.112</CRMVersion>
</ServerInformation>
</CrmScriptErrorReport>Are you on-premise, or on-line? : It's on-premise
Can you reproduce it on-demand, or is it sporadic?: It's sporadic
There is a mention of loading an iFrame in the error, do you have iFrames on the form that generates this error?
It's not on specific forms, so can't identify that. Yes we have iframes on some forms.
Does it happen on any/all entity forms, or specific ones? Do the entity forms have any custom JavaScript on them?
It's not on specific forms. And yes we have javascript on almost all forms.
Do you have any network problems or slowness in your network? Does the problem happen when the network is busy?
We need to check this on next occurrence.
Do the users that see this error have any unusual add-ins or toolbars in their browser? This is not for specific user. Its happening for all randomly.
Have you tried other browsers like Chrome or FireFox and do users see the problem there as well?
We need to check only for IE. -
How to show filtered parameter in dropdown form in crm 2013
Hi,
I want to create a report in crm 2013. When I report is run then filtered parameter fill record from database in dropdown form and when I select record from dropdown then generate report of selected record. Please tell me how to show record in filtered parameter
from database within crm. In below image paramter is text field. How to auto fill filtered parameter from database.Hi Aamir,
Check if the below link helps!!
https://social.microsoft.com/Forums/en-US/ad8a3bc2-dbec-4597-adfd-8bd6c34f5e9a/drop-down-parameter-in-crm-2011-custom-report?forum=crm
Thanks,
Prasad
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question. -
Dynamic Hyperlink in SSRS 2008 for CRM 2013 online
Hi All,
I have a report which displays contact name and contactid from contact table
I need a link to the contact name which open the CRM record
Is this possible ?
Any suggestion most appreciated
Thanks
Pradnya07Hi
i been using this url for help
http://h30507.www3.hp.com/t5/Applications-Services-Blog/Microsoft-Dynamics-CRM-2013-SSRS-drill-down-reports-Part-II/ba-p/149943
but it didnt worked i get the below error
Any help much appreciated
Thanks
Pradnya07 -
Unable to load plug-in assembly for crm 2013 on site
hi,
i am trying to register a plugin that i wrote to our CRM 2013 on site, i have copied my dll and the 2 ms dll's Microsoft.Crm.Sdk.Proxy.dll and Microsoft.Xrm.Sdk.dll to C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly on the CRM
server machine. this assembly directory has all of the permissions for my user and the same user has the Deployment Administrator role in CRM.
however, i am still getting an error "Unable to load plug-in assembly." when trying to register the assembly plugin in without isolation mode, on disc. when i register to database it works fine. but i would like to stick to the disc
while debugging.
what else could be causing this problem?
thanks,
InnaThat is a strange one, I've never had good luck with anything other than database deployment. You can debug the plugin DLL using database deployment.
That being said, there is a very good tool called DevDeployment that you can use for your VS build process to publish the updated DLL after it's built.
http://www.patrickverbeeten.com/CRM-Applications/Deployment-Helper
Not sure if this answers the question, but if you don't get an answer you can use this tool anyway. -
CRM 2013 - "Save and Close" button behavnig like "Save and New"
Hi,
I am working in CRM 2013. I have a scenario in which I am saving new opportunity product record through javascript and preventing original save of CRM. Save is working fine. After save, I need to refresh the screen. So I have used "Xrm.Utility.openEntityForm"
to open newly created item in edit mode. When I click on "Save and Close" button on this new form in edit mode, instead of closing the opportunity product screen, it opens new entity form. So in short, after saving the record, if I click on "Save
and Close", it behaves like "Save and New".
Any one facing such issue?Save & Close seems to behave like the Save & "Back" Button, so the form tries to return to the new form, that was opened before.
But I have no solution for this behavior... -
App-V CRM 2013 Outlook Client and Office 2013 Click to Run
Hi,
I'm trying to get going with enbing the CRM 2013 for Outlook client with the VL version of Office Pro Plus 2013. I have successfully published and use Office App-V package in a test environment. App-V version 5.0 SP2 is installed on the client
PC (Windows 7 64bit). SCCM 2012 R2 is used to publish APP-V applications to user groups.
I have sequenced the CRM 2013 Outlook client (offline mode disabled) with UR2 and published it using SCCM as a "Add-on or Plug-in. I've also created a connection group so that the App-V version of Office 2013 is able to connect to the sequenced
CRM client. The client installs successfully, but the CRM tab doesn't appear in the Outlook Ribbon, and the Configuration Wizard crashes each time it is launched. The App-V event log is blank (which I'm taking to be a good sign). All CRM
client prerequisites have been preinstalled on the target PC.
I'm thinking that the CRM client can't see the Outlook application and therefore crashes and doesn't integrate with the Outlook application. Problem Signature 09 (from the crash explanation) states "System.NullReference Exception".
I can't seem to find much out there for sequencing the 2013 version of the client. Has any else managed this yet or have any ideas where I'm going wrong?
Thanks,
TimHello,
I would use Process Monitor to understand what happens and to see why Outlook isn't seeing the plugin, and why the wizard is crashing
Nicke Källén | The Knack| Twitter:
@Znackattack -
Error while installing the Microsoft Dynamics CRM 2013 Report Authoring Extension set up
HI Experts,
I am trying to install Report Authoring extension tool to work with MS CRM 2015 online reports but unable to install, getting below error even though I am having VS 2013, SQL Server 2014 and Data tools for VS 2013 installed on my machine.
Please help me to fix this issue.
When I double click the error getting below error.
Error : Business Intelligence Development Studio is not installed for Microsoft SQL Server Reporting Services.
When I click the details , getting below error.
Thanks
Baji RahamanThe Report Authoring Extensions (any version) don't support VS 2013. Currently the Crm 2015 Report Authoring Extensions support VS 2012 and VS 2010, and the Crm 2013 Report Authoring Extensions supports only VS 2010.
By the way, the error you posted suggests you're trying to install the Crm 2011 Report Authoring Extensions
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
Maybe you are looking for
-
when i first created my account i put mu Visa in it, and my son started to use my account on his ipad and ipod, and i would like to remove it, but i can't there is no option to select NONE from my account information... WOULD SOMEBODY HELP ME PLEASE
-
OIM 11g Modify User Profile for Updating End Date
Hi Gurus! We have an OIM implementation where users may request the creation of other users by means of a Create User request template. In this template we set the End Date to be 3 months after the request date. In order for the requester to extend t
-
Displaying JPG images in PDF report
Hi We developed a report, wich generates modul documentation from designer repository. In the repository the JPG images are attached to modules. The images have different sizes. The report reads the modules description and displays the images attache
-
hi Guru's i am trying to Access ES web Servies in VC 7.0 SP 14 . when i try to Access the web service I am geting the following error . Ports 'PO' ,'PO' were omitted because they include nested tables. Please help me ..very urgent . full point will b
-
CLEANUP_USESSAUD is locked in MS SQL 2005 database
Hi team, CLEANUP_USESSAUD stored procedure is encrypted bydefault in MS SQL 2005 database. May i know, how to unlock and modify this procedure?