Microsoft Dynamics Support Forum Index Microsoft Dynamics Support
Visit the Microsoft Dynamics newsgroups and exchange ideas with a community of business professionals and product experts from around the globe.
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

Workflow plug-in

 
Post new topic   Reply to topic    Microsoft Dynamics Support Forum Index -> Microsoft Dynamics CRM Developer
Author Message
SiboG
Guest





PostPosted: Tue May 27, 2008 7:01 pm    Post subject: Workflow plug-in Reply with quote

I have created a Workflow Plug-In for CRM 4.0 in C# (Visual Studio 2005) and
I am using the “plugindeveloper” tool from the SDK to register it.

The plug-in registers when I use CRM attributes like string and CrmDateTime.

Example:
public static DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string),
typeof(CrmWorkflowContactTransfer));
[CrmInput("Title")]
public string Title
{
get
{
return (string)base.GetValue(TitleProperty);
}
set
{
base.SetValue(TitleProperty, value);
}
}

When I use the CRM attribute UniqueIdentifier or Key the “plugindeveloper”
tool does not register it.

Example:
public static DependencyProperty ContactGUIDProperty =
DependencyProperty.Register("ContactGUID", typeof(Key),
typeof(CrmWorkflowContactTransfer));
[CrmInput("Contact GUID")]
public Key ContactGUID
{
get
{
return (Key)base.GetValue(ContactGUIDProperty);
}
set
{
base.SetValue(ContactGUIDProperty, value);
}
}

What I am trying to do, it is to get the contact id from the contact entity
and use it in the plug-in.

It seems that it is not possible to access the contact id using the above
code. Is there is other method to get the GUId?
Back to top
Patrick
Guest





PostPosted: Thu May 29, 2008 10:27 pm    Post subject: RE: Workflow plug-in Reply with quote

The uniqueidentifier and key types cannot be used on workflow activities. You
should make the property of type Lookup. You should also add the attribute
CrmReferenceTarget to the property declaration

[CrmInput("Contact GUID")]
[CrmReferenceTarget("contact")]
public Lookup ContactGUID
{

--
Patrick Verbeeten (MCPD)
Lead Developer
Aviva IT

Extended Entity and Plug-in browser:
http://www.patrickverbeeten.com/maps/CrmTool.aspx



"SiboG" wrote:

Quote:
I have created a Workflow Plug-In for CRM 4.0 in C# (Visual Studio 2005) and
I am using the “plugindeveloper” tool from the SDK to register it.

The plug-in registers when I use CRM attributes like string and CrmDateTime.

Example:
public static DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string),
typeof(CrmWorkflowContactTransfer));
[CrmInput("Title")]
public string Title
{
get
{
return (string)base.GetValue(TitleProperty);
}
set
{
base.SetValue(TitleProperty, value);
}
}

When I use the CRM attribute UniqueIdentifier or Key the “plugindeveloper”
tool does not register it.

Example:
public static DependencyProperty ContactGUIDProperty =
DependencyProperty.Register("ContactGUID", typeof(Key),
typeof(CrmWorkflowContactTransfer));
[CrmInput("Contact GUID")]
public Key ContactGUID
{
get
{
return (Key)base.GetValue(ContactGUIDProperty);
}
set
{
base.SetValue(ContactGUIDProperty, value);
}
}

What I am trying to do, it is to get the contact id from the contact entity
and use it in the plug-in.

It seems that it is not possible to access the contact id using the above
code. Is there is other method to get the GUId?
Back to top


Display posts from previous:   
Post new topic   Reply to topic    Microsoft Dynamics Support Forum Index -> Microsoft Dynamics CRM Developer All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2005 phpBB Group

eXTReMe Tracker