Monday, October 31, 2011

MSCrm 2011 - Workflow Assembly Get Current Entity ID

MSCrm 2011 - Workflow Assembly Get Current Entity ID

This is a workflow assembly that returns the current record ID (Guid) in Dynamics crm 2011.
There is only one drawback, It won't work in Dynamics CRM 2011 ONLINE because workflow assemblies aren't supported there.


    public class GetEntityId : CodeActivity
        protected override void Execute(CodeActivityContext executionContext)
            //Create the tracing service
            ITracingService tracingService = executionContext.GetExtension<ITracingService>();

            IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
            EntityId.Set(executionContext, context.PrimaryEntityId.ToString());

        [Output("Entity Id")]
        public OutArgument<string> EntityId { get; set; }

1) Copy the .dll from the bin folder to <%CRM folder%>\Server\bin\assembly
2) Use the plugin registration tool to register the workflow assembly
3) Now you should be able to see it in the Workflow window:

4) After you added it to the Workflow you can use it:

Download Link:

Dynamics CRM 2011 ONLINE users walkaround:
Create plugin on post create step insert the id to some text field.
The plugin has advantage, as it will work on all environments

Plugin version:

Sunday, October 16, 2011

MSCRM 2011 Javascript save and close

In 2011 This script doesn't work:
2. window.close();

CRM 4.0 Code (Worked great):

The solution in 2011:"saveandclose")

The right why in 4.0

and just for closing the window

Saturday, October 8, 2011

dynamics crm 2011 online lead capture

It's finally here Dynamics CRM 2011 online lead capture is Available in Israel. After I've read about it, searched for it and failed to find it few months ago, Finally it's there.

It's easy to connect the CRM to the company's web page, something that's makes a lot of sense in Customer Relationship Management system.
More information: