Friday, 5 December 2014

Account Related Activities from subgrid to SSRS Report

Hi All,

Many of us know that the activities are stored activity pointer entity  but the actual mapping of an activity and the related entity is stored in activitypointer.

The activities like : Task,Phonecalls , fax. appointmets ... etc are stored as an different entities where the mapping to these activities  with it's recipients and regardingobjetcs are stored in the activityparty tables.

Here my requirement is to get all the activities, which shown in the  left navigation of account related activities.

The Query will be as below :

select 
a.subject, a.activitytypecodename,a.owneridname,a.statecodename, a.prioritycodename, a.actualdurationminutes, a.regardingobjectidname 
from FilteredActivityParty ActivityParty 
inner join 
FilteredActivityPointer A on a.activityid = ActivityParty.activityid 
left join 
FilteredContact C on ActivityParty.partyid= C.ContactId 




by using the above query In BIDS in dataset, apply required parameters for filtering



Thanks
Naveen Dasari

Saturday, 1 February 2014

Microsoft Dynamic CRM Plugin Registration timestamp Error

Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: The security timestamp is stale because its expiration time ('2014-02-01T08:54:27.000Z') is in the past. Current time is '2014-02-01T15:49:25.389Z' and allowed clock skew is '00:05:00'.


 While connecting to Plugin Registration Tool, i got the following error



The Error is : 


Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: The security timestamp is stale because its expiration time ('2014-02-01T08:54:27.000Z') is in the past. Current time is '2014-02-01T15:49:25.389Z' and allowed clock skew is '00:05:00'.



Server stack trace: 
   at System.ServiceModel.Security.SecurityTimestamp.ValidateFreshness(TimeSpan timeToLive, TimeSpan allowedClockSkew)
   at System.ServiceModel.Security.SecurityTimestamp.ValidateRangeAndFreshness(TimeSpan timeToLive, TimeSpan allowedClockSkew)
   at System.ServiceModel.Security.ReceiveSecurityHeader.ReadTimestamp(XmlDictionaryReader reader)
   at System.ServiceModel.Security.ReceiveSecurityHeader.ExecuteFullPass(XmlDictionaryReader reader)
   at System.ServiceModel.Security.ReceiveSecurityHeader.Process(TimeSpan timeout, ChannelBinding channelBinding, ExtendedProtectionPolicy extendedProtectionPolicy)
   at System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessageCore(Message& message, TimeSpan timeout)
   at System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout)
   at System.ServiceModel.Security.SecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
   at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(AuthenticationCredentials authenticationCredentials)
   at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateInternal(AuthenticationCredentials authenticationCredentials)
   at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateCrossRealm(ClientCredentials clientCredentials, String appliesTo, Uri crossRealmSts)
   at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.AuthenticateCore()
   at Microsoft.Xrm.Sdk.Client.ServiceProxy`1.ValidateAuthentication()
   at Microsoft.Xrm.Sdk.Client.ServiceContextInitializer`1.Initialize(ServiceProxy`1 proxy)
   at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest request)
   at Microsoft.Crm.Tools.PluginRegistration.CrmConnection.RetrieveOrganizations()
   at Microsoft.Crm.Tools.PluginRegistration.ConnectionsForm.OpenConnection(CrmConnection con)

This is because of the time zone setting in the client machine are not correct with respect to the crm online organization. 

To resolve this issue we have to Reset the Time zone and time. then we can connect to your organiation Using the plugin registration tool.

Follow the below screenshot to update the time zone with internet timezone servers.
I resolved the above issue as i mentioned above.