using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

crm

    Sponsored Links

    Next

  • 1. Account - > History -> Activity (would like to include more information in this view)
    Hi Everybody We have been using the CRM system for a couple of weeks by now. And we haven't been able to find any way of including, date information regarding e-mail activity, ex. when was the mail sent, recieved, to and from. this could be nice to have when you look at the history of a customer, without having to open every single email in the activity list. i know that the activity list may include other stuff than email, but honestly shouldn't the email send/recived date have been included in this view? kind regards Carl
  • 2. Transactional Integrity
    Has anyone started tackling the problem of transactional integrity? By this I mean scenarios such as making several API calls that must all complete sucessfully for the business transaction to be complete. For example, receiving account and contact data from an external system. What happens if the account create API call succeeds and the contact create fails? If I were using the database directly, I would just enclose these in BEGIN TRAN...END TRAN. However, the CRM SDK has no support for this. I have started looking for approaches ranging from implmenting my own tranaction management approach (including locking, before and after images, and rollback) to having each business transaction know how to restart itself, in the middle if necessary. What approaches have others taken? TIA, Scott Ainsworth Compass Technology
  • 3. [CRM 3.0] working with an external database
    Hi all, I am currently working with CRM 3.0 and an external sql database. The external data controls are placed into an Iframe. A button placed into the Iframe permit the user to save the external datas into the external database. The classic save button permit the user to save the CRM attributes into the CRM database. I would like the classic save button to trigger the save of the data placed in the Iframe into the external database. Could someone help me please ? Thank you all. Niko
  • 4. scripting woes
    I would automatically like to populate a new contract's fields with some data. i have added code OnEvent to the Contract Template (contracttemplateid) field, but it does not work. for example 1) I want to take the name of the contract template and use that as the default name of the new contract. The code I've added to the event handler is: crmForm.all.title.DataValue = crmForm.all.contracttemplateid.name; the crmForm.all.contracttemplateid.name field's value is null, even after a new contract template is selected and it appears in the Contract Template field 2) I would like to make the billing customer the same as the customer. The code i've added is: crmForm.all.billingcustomerid.Value = crmForm.all.customerid.DataValue; this is also null, even when a customer appears in the Customer field (customerid) 3) I would like to set the default start dates to today and expiration date to today + 1 year I've added the following code crmForm.all.activeon.date= "1/1/2006"; crmForm.all.expireson.date= "12/31/2006"; the dates in the contract form are blank after this. What am i doing wrong in these 3 cases? i think i am following the SDK documentation (even though it is pitiful) I really appreciate your help m

using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

Postby ZG9taW5pa19odWc » Wed, 22 Jul 2009 22:59:01 GMT

i all

I want to use the Enterprise Library 4.1 Logging Block to make the tracing
in a Custom Workflow Activity (CWA).
I have written a CrmAsyncService.exe.config as configuration file (reading
settings out of this file from a CWA works.

In the project I referenced the
Microsoft.Practices.EnterpriseLibrary.Logging.dll with "Copy Local" set to
true. In the Windows Explorer in the properties of the assembly I can see
that it is a signed assembly.

I copied the assembly Microsoft.Practices.EnterpriseLibrary.Logging.dll
along with
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.ObjectBuilder2.dll
Microsoft.Practices.Unity.dll
in the bin\assembly folder of CRM.

But every time the CWA ist executed I have the following error in the trace
output of CRM:

[2009-07-21 14:52:26.9] Process:CrmAsyncService
|Organization:a6cc8da2-b53a-47b8-b732-ffa29982cfb1 |Thread: 4 |Category:
Platform.Workflow |User: 00000000-0000-0000-0000-000000000000 |Level: Error |
WorkflowHost.OnWorkflowTerminated
at WorkflowHost.OnWorkflowTerminated(Object sender,
WorkflowTerminatedEventArgs args)
at WorkflowRuntime.OnScheduleTerminated(WorkflowExecutor schedule,
WorkflowTerminatedEventArgs args)
at WorkflowRuntime.WorkflowExecutionEvent(Object sender,
WorkflowExecutionEventArgs e)
at EventHandler`1.Invoke(Object sender, TEventArgs e)
at WorkflowExecutor.FireWorkflowTerminated(Exception exception)
at SchedulerLockGuard.FireEvents(List`1 eventList, WorkflowExecutor
workflowExec)
at SchedulerLockGuard.Dispose()
at WorkflowExecutor.RunSome(Object ignored)
at WorkItem.Invoke(WorkflowSchedulerService service)
at DefaultWorkflowSchedulerService.QueueWorkerProcess(Object state)
at _ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code,
CleanupCode backoutCode, Object userData)
at ExecutionContext.RunInternal(ExecutionContext executionContext,
ContextCallback callback, Object state)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback
callback, Object state)
at
_ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback
tpWaitCallBack)
at _ThreadPoolWaitCallback.PerformWaitCallback(Object state)
File name: 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at
System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord
configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at
System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at
System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary

RE: using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

Postby ZG9taW5pa19odWc » Fri, 24 Jul 2009 00:36:01 GMT

found the solution my self:

Adding
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="assembly"/>
</assemblyBinding>
</runtime>
to the CrmAsyncService.exe.config helped.
Interestingly in the Plugins and CustomWorkflowActities I also reference an
assembly
I developed my self and the calling assembly managed to locate it (without
the probing element).

"dominik_hug" wrote:


Similar Threads:

1.CRM Callouts & Microsoft Enterprise Library Application Blocks

We are writing a callout for a project and we would like to use the Microsoft 
Enterprise Library (MEL) for configuration, logging, and data access.  It is 
our enterprise standard to utilize those blocks for those activities on all 
of our efforts.  The problem is that I don't see a readily available 
app.config or web.config file for which I can add the configuration context 
necessary to utilize those features.

I also am very averse to modifying any core Microsoft Dynamics CRM 3.0 
app.config or web.config file because it has the potential of being wiped out 
during any future upgrades.  So far we have envisioned two options but would 
like some community feedback to help us define a best practice.

Option 1: Use the MEL ConfigurationManager to load context from a file and 
execute against that context
PRO: It seems as if it may get us closer 
CON: Externally loaded context does not become the "current context".  
Existing in-house libraries hard-wired to execute against the "current 
context" may not be utilized.

Option 2: Add the configuration context to the machine.config
PRO: We may utlize all existing in-house libraries 
CON: We have a standard to not use the machine.config for anything to avoid 
potential maintenance headaches.

We are leaning towards [Option 2] and changing our standard to allow 
authorized modifications to the machine.config only.  This is because we 
enjoy leveraging the current context in our core libraries to avoid having to 
pass context and configuration information through every layer of our code.


2.is it possible to have a multiple Lookup in a custom Workflow acti

3.How to get logged in user GUID in custom component using mscrm 3.0

I am using this code to retrive GUID but it's always return same GUID of 
system user(named SYSTEM in the systemuserbase table).

CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse user = (WhoAmIResponse) service.Execute(userRequest);
String loggedInUserId = user.UserId.ToString();

I think it is the case of setting the impersonation in the CRM web.config 
and the corresponding application web.config.

Any suggestion would be helpful.

4.How to get logged in user GUID in custom component using mscrm

Hi Tibor,

Thanks for your reply. As you written in step 1 impersonate your user that i 
already done through web.config(<identity impersonate="true" />)

Please explain these steps in some more detail. If you have any sample code 
regarding to this thats is very helpful for me.

Many thanks for your help.

Kedar N. Kumar

"Tibor" wrote:

> Hi Kumar,
> 
> you can use service.caller.callerguid to get/set this property.
> But the call-outs are running under the name of NT AUTHORITY\Network Service 
> = (SYSTEM)
> You can do the following:
> - imersonate your user user using the Credentialcache
> - find you user through crm webservice in the database
> - retrieve the id of your user
> - log this id.
> 
> Regards,
> Tibor
> 
> "Kedar Nath Kumar" wrote:
> 
> > I am using this code to retrive GUID but it's always return same GUID of 
> > system user(named SYSTEM in the systemuserbase table).
> > 
> > CrmService service = new CrmService();
> > service.Credentials = System.Net.CredentialCache.DefaultCredentials;
> > 
> > WhoAmIRequest userRequest = new WhoAmIRequest();
> > WhoAmIResponse user = (WhoAmIResponse) service.Execute(userRequest);
> > String loggedInUserId = user.UserId.ToString();
> > 
> > I think it is the case of setting the impersonation in the CRM web.config 
> > and the corresponding application web.config.
> > 
> > Any suggestion would be helpful.

5.Word templates using WSS as document library

6. Outbound email blocked as SPAM when using the CRM4.0 router

7. Custom Libraries in CRM4.0

8. Calling assembly from workflow - blocking problem?



Return to crm

 

Who is online

Users browsing this forum: No registered users and 53 guest