using Enterprise Library 4.1 Logging Block in Custom Workflow Acti

crm

    Sponsored Links

    Next

  • 1. Dose Sitemap config file support east asia languages?
    Hi I try to add some areas within the nav panel by modify sitemap config file, it works well if I set the Title value with english character, but if I set value with east asia language character and afer upload the sitemap, it always report error the title with empty value. I try to upload sitemap with UTF-8 encoding, it is also failed. Dose Sitemap config file support east asia languages? Thanks Abrams
  • 2. problem when Importing customization file modified
    hello, I have a problem I can't import a customization file for Lead I just add the following to the original file: <attribute PhysicalName="New_AutoRoute"> <Type>bit</Type> <ValidForCreateApi>1</ValidForCreateApi> <ValidForUpdateApi>1</ValidForUpdateApi> <ValidForReadApi>1</ValidForReadApi> <IsCustomField>1</IsCustomField> <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask> <Description /> </attribute> - <attribute PhysicalName="new_autorouteName"> <Type>virtual</Type> <ValidForReadApi>1</ValidForReadApi> <IsCustomField>1</IsCustomField> <IsLogical>1</IsLogical> <AttributeOf>New_AutoRoute</AttributeOf> <XmlAbbreviation>name</XmlAbbreviation> </attribute> what can be the error please help Regards Meriem
  • 3. JScript code to retrieve the logged in user
    Is it possible to get the GUID of the logged in user or determine the security roles of the logged in user from an OnLoad event of an Account form? Jack Bender
  • 4. Close a CRM task Via SDK
    Hi Guys, I am trying to close a CRM task via the SDK. The below code updates the CRM task, but doesnt close it. I have tried setting statecode and stauscode to all different values, but nothing closes down the activity. Can anyone hlp me. This code does update the task, as i have set the subject to equal FFFFF just to test it was updating correctly. Any help would be fantastic! cheers! foreach (Object o in matchingTasks.BusinessEntities) { CrmSdk.task sysTask = new CrmSdk.task(); sysTask = (CrmSdk.task)o; sysActivityId = sysTask.activityid.Value; //debug only WirteToFile(sysActivityId.ToString(),"made it to here.txt"); sysTask.statecode = new TaskStateInfo(); sysTask.statecode.Value = TaskState.Completed; sysTask.statuscode = new Status(); sysTask.statuscode.Value = Convert.ToInt32(textBox2.Text); sysTask.subject = "fffff"; TargetUpdateTask target = new TargetUpdateTask(); target.Task = sysTask; UpdateRequest update = new UpdateRequest(); update.Target = target; UpdateResponse updated = (UpdateResponse)service.Execute(update); WirteToFile(sysTask.subject,"closeditdown.txt"); }

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 8 guest