Hi NG,
i try to make the MS Post Call-Out SDK from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm/html/mbs_crmpostcallouts.asp.
I do it step by step like the How to of this sample told, but i have a
problem, when i make a new Account, the file won't be created.

Here is my C# Code, i only change the GUID.

using System;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
using System.IO;

[assembly: ApplicationName("Callout Example")]
[assembly: ApplicationActivation(ActivationOption.Server)]
[assembly:
ApplicationAccessControl(false,AccessChecksLevel=AccessChecksLevelOption.App
licationComponent)]
namespace CRMCallout.dll
{
[GuidAttribute("2382EA48-5415-4035-9401-E72AD28C76F4")]

public interface ICRMCallout
{
void PostCreate(int ObjectType, string ObjectId, string OrigObjectXml);
void PostUpdate(int ObjectType, string ObjectId, string OrigObjectXml);
void PostDelete(int ObjectType, string ObjectId);
}
[GuidAttribute("E32FDCBC-D4F3-45fb-9C99-737F914905D7")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]

public class CRMCaller : ServicedComponent, ICRMCallout
{
public void PostCreate(int ObjectType, string ObjectId, string
OrigObjectXml)
{
FileInfo fi = new FileInfo(@"C:\CSCallout_Insert.txt");
StreamWriter s = fi.AppendText();
s.WriteLine("CRM Create Event Occurred...\n");
s.WriteLine("Object Type: " + ObjectType.ToString());
s.WriteLine("Object ID: " + ObjectId.ToString());
s.WriteLine("Object XML String: ");
s.WriteLine(OrigObjectXml);
s.WriteLine();
s.Close();
}
public void PostUpdate(int ObjectType, string ObjectId, string
OrigObjectXml)
{
FileInfo fi = new FileInfo(@"C:\CSCallout_Update.txt");
StreamWriter s = fi.AppendText();
s.WriteLine("CRM Update Event Occurred...\n");
s.WriteLine("Object Type: " + ObjectType.ToString());
s.WriteLine("Object ID: " + ObjectId.ToString());
s.WriteLine("Object XML String: ");
s.WriteLine(OrigObjectXml);
s.WriteLine();
s.Close();
}
public void PostDelete(int ObjectType, string ObjectId)
{
FileInfo fi = new FileInfo(@"C:\CSCallout_Delete.txt");
StreamWriter s = fi.AppendText();
s.WriteLine("CRM Delete Event Occurred...\n");
s.WriteLine("Object Type: " + ObjectType.ToString());
s.WriteLine("Object ID: " + ObjectId.ToString());
s.WriteLine();
s.Close();
}
}
}

The SQL Statement i modify the SQL statement so that the GUID is the same
like in my sample

[SQL]
declare @subscriberid uniqueidentifier
set @subscriberid = newid()

-- Insert Subscriber (Sample Module)
insert into Subscriber(SubscriberId, CLSIDorProgId, Name, Description)
values
(@subscriberid, N'{E32FDCBC-D4F3-45fb-9C99-737F914905D7}', N'My SDK Sample',
N'My SDK Sample')

--Insert into EntityEventSubscribers
declare @entityid uniqueidentifier

--Account(post-create, post-update, post-delete)
select @entityid = EntityId from Entity where ObjectTypeCode = 1
update Entity set EventMask = EventMask | 1 where ObjectTypeCode = 1

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(2, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(8, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(32, @entityid, @subscriberid, 0, 1, 0)

--Contact(post-create, post-update, post-delete)
select @entityid = EntityId from Entity where ObjectTypeCode = 2
update Entity set EventMask = 1 where ObjectTypeCode = 2

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(2, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(8, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(32, @entityid, @subscriberid, 0, 1, 0)

--Customer Address(post-create, post-update, post-delete)
select @entityid = EntityId from Entity where ObjectTypeCode = 1071
update Entity set EventMask = 1 where ObjectTypeCode = 1071

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(2, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(8, @entityid, @subscriberid, 0, 1, 0)
insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,
CalloutOrder, IsEnabled, IsAsyncHandler) values
(32, @entityid, @subscriberid, 0, 1, 0)

I Add the Calss Libary also as Com+ Application (but there is an athoer
ProgID)
Can somebody help me, a tell me what i did wrong?

RE: MS Post Call-Out Sample by rbakkers

rbakkers
Tue Mar 02 03:51:06 CST 2004

We had the same problem, and in my opinion the example isn't too clear on it. But the first Guid in your application needs to be the F4E... guid that is used in the example

Regards
Rob Bakker
Accenture

Re: MS Post Call-Out Sample by Andre

Andre
Tue Mar 02 04:31:43 CST 2004

So i must do my SQL Staement with the F4E... GUID?
Thx Andre Grumbach


--
P.S. Please remove 'nospam' from the EMail address

<rbakkers@hotmail.com> schrieb im Newsbeitrag
news:FB89031E-3DAE-4A18-8407-E13C93461F73@microsoft.com...
> We had the same problem, and in my opinion the example isn't too clear on
it. But the first Guid in your application needs to be the F4E... guid that
is used in the example.
>
> Regards,
> Rob Bakkers
> Accenture



Re: MS Post Call-Out Sample by Andre

Andre
Tue Mar 02 06:44:49 CST 2004

Hi Rob,
I also try it with this F4233E5B-17DC-4661-9ABC-6707A9F99215 GUID, but it
have the same result and didn't work.
i tell you know my approach:
1.. I'm Programming (copy) the HowTo from this page
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crmPostCalloutsv1d2.asp
(on my local Computer)
2.. I make a strong key for this project and add it to the Assembly.cs
3.. I'm built the Code
4.. I copy the code to the VPC Server with the MSCRM (on this VPC isn't
any kind of VS-Net installed, only the :Net Framework)
5.. I registry the release Dll to the Gac (like Gacutil -i path to dll)
6.. I register with regsvcs path to dll
7.. I registry the Callout Object in the SQL Statement (I am using the
GUID like I'm using for my CRM Calss)
After I do this, I try to check my Sample and create an Account in the CRM.

But it didn't work, there is no text file.

So what did I wrong?

Here is my C# code and my SQL Statemant (again):

[C#]

using System;

using System.EnterpriseServices;

using System.Runtime.InteropServices;

using System.IO;





[assembly: ApplicationName("Callout Example")]

[assembly: ApplicationActivation(ActivationOption.Server)]

[assembly:
ApplicationAccessControl(false,AccessChecksLevel=AccessChecksLevelOption.App
licationComponent)]



namespace CRMCallout.dll

{



[GuidAttribute("F4233E5B-17DC-4661-9ABC-6707A9F99215")]



public interface ICRMCallout

{

void PostCreate(int ObjectType, string ObjectId, string
OrigObjectXml);

void PostUpdate(int ObjectType, string ObjectId, string
OrigObjectXml);

void PostDelete(int ObjectType, string ObjectId);

}



[GuidAttribute("AA4AD2AC-97B8-4d24-8E81-388A655DDBE5")]

[ClassInterface(ClassInterfaceType.AutoDispatch)]



public class CRMCaller : ServicedComponent, ICRMCallout

{



public void PostCreate(int ObjectType, string ObjectId, string
OrigObjectXml)

{

FileInfo fi = new FileInfo(@"C:\CSCallout_Insert.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Create Event Occurred...\n");

s.WriteLine("Object Type: " + ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine("Object XML String: ");

s.WriteLine(OrigObjectXml);

s.WriteLine();

s.Close();

}



public void PostUpdate(int ObjectType, string ObjectId, string
OrigObjectXml)

{

FileInfo fi = new FileInfo(@"C:\CSCallout_Update.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Update Event Occurred...\n");

s.WriteLine("Object Type: " + ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine("Object XML String: ");

s.WriteLine(OrigObjectXml);

s.WriteLine();

s.Close();

}



public void PostDelete(int ObjectType, string ObjectId)

{

FileInfo fi = new FileInfo(@"C:\CSCallout_Delete.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Delete Event Occurred...\n");

s.WriteLine("Object Type: " + ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine();

s.Close();

}

}

}



[SQL]

declare @subscriberid uniqueidentifier

set @subscriberid = newid()



-- Insert Subscriber (Sample Module)

insert into Subscriber(SubscriberId, CLSIDorProgId, Name, Description)

values

(@subscriberid, N'{F4233E5B-17DC-4661-9ABC-6707A9F99215}', N'My Sample

Callout Module', N'')



--Insert into EntityEventSubscribers

declare @entityid uniqueidentifier



--Account(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 1

update Entity set EventMask = EventMask | 1 where ObjectTypeCode = 1



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



--Contact(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 2

update Entity set EventMask = 1 where ObjectTypeCode = 2



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



--Customer Address(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 1071

update Entity set EventMask = 1 where ObjectTypeCode = 1071



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



I hope somebody can help me



Thx Andre Grumbach


--
P.S. Please remove 'nospam' from the EMailaddress


<rbakkers@hotmail.com> schrieb im Newsbeitrag
news:FB89031E-3DAE-4A18-8407-E13C93461F73@microsoft.com...
> We had the same problem, and in my opinion the example isn't too clear on
it. But the first Guid in your application needs to be the F4E... guid that
is used in the example.
>
> Regards,
> Rob Bakkers
> Accenture



Re: MS Post Call-Out Sample by Matt

Matt
Tue Mar 02 10:26:53 CST 2004

Andre,

As Rob mentioned, make sure that you interface has the EXACT GUI from
the example. But you still register the GUID from your coponent in
the table.

Matt

On Tue, 2 Mar 2004 13:44:49 +0100, "Andre Grumbach"
<andre.grumbach@.itvt.nospam.de> wrote:

Hi Rob,
I also try it with this F4233E5B-17DC-4661-9ABC-6707A9F99215 GUID, but
it
have the same result and didn't work.
i tell you know my approach:
1.. I'm Programming (copy) the HowTo from this page
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crmPostCalloutsv1d2.asp
(on my local Computer)
2.. I make a strong key for this project and add it to the
Assembly.cs
3.. I'm built the Code
4.. I copy the code to the VPC Server with the MSCRM (on this VPC
isn't
any kind of VS-Net installed, only the :Net Framework)
5.. I registry the release Dll to the Gac (like Gacutil -i path to
dll)
6.. I register with regsvcs path to dll
7.. I registry the Callout Object in the SQL Statement (I am using
the
GUID like I'm using for my CRM Calss)
After I do this, I try to check my Sample and create an Account in the
CRM.

But it didn't work, there is no text file.

So what did I wrong?

Here is my C# code and my SQL Statemant (again):

[C#]

using System;

using System.EnterpriseServices;

using System.Runtime.InteropServices;

using System.IO;





[assembly: ApplicationName("Callout Example")]

[assembly: ApplicationActivation(ActivationOption.Server)]

[assembly:
ApplicationAccessControl(false,AccessChecksLevel=AccessChecksLevelOption.App
licationComponent)]



namespace CRMCallout.dll

{



[GuidAttribute("F4233E5B-17DC-4661-9ABC-6707A9F99215")]



public interface ICRMCallout

{

void PostCreate(int ObjectType, string ObjectId, string
OrigObjectXml);

void PostUpdate(int ObjectType, string ObjectId, string
OrigObjectXml);

void PostDelete(int ObjectType, string ObjectId);

}



[GuidAttribute("AA4AD2AC-97B8-4d24-8E81-388A655DDBE5")]

[ClassInterface(ClassInterfaceType.AutoDispatch)]



public class CRMCaller : ServicedComponent, ICRMCallout

{



public void PostCreate(int ObjectType, string ObjectId,
string
OrigObjectXml)

{

FileInfo fi = new
FileInfo(@"C:\CSCallout_Insert.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Create Event Occurred...\n");

s.WriteLine("Object Type: " +
ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine("Object XML String: ");

s.WriteLine(OrigObjectXml);

s.WriteLine();

s.Close();

}



public void PostUpdate(int ObjectType, string ObjectId,
string
OrigObjectXml)

{

FileInfo fi = new
FileInfo(@"C:\CSCallout_Update.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Update Event Occurred...\n");

s.WriteLine("Object Type: " +
ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine("Object XML String: ");

s.WriteLine(OrigObjectXml);

s.WriteLine();

s.Close();

}



public void PostDelete(int ObjectType, string ObjectId)

{

FileInfo fi = new
FileInfo(@"C:\CSCallout_Delete.txt");

StreamWriter s = fi.AppendText();

s.WriteLine("CRM Delete Event Occurred...\n");

s.WriteLine("Object Type: " +
ObjectType.ToString());

s.WriteLine("Object ID: " + ObjectId.ToString());

s.WriteLine();

s.Close();

}

}

}



[SQL]

declare @subscriberid uniqueidentifier

set @subscriberid = newid()



-- Insert Subscriber (Sample Module)

insert into Subscriber(SubscriberId, CLSIDorProgId, Name, Description)

values

(@subscriberid, N'{F4233E5B-17DC-4661-9ABC-6707A9F99215}', N'My Sample

Callout Module', N'')



--Insert into EntityEventSubscribers

declare @entityid uniqueidentifier



--Account(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 1

update Entity set EventMask = EventMask | 1 where ObjectTypeCode = 1



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



--Contact(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 2

update Entity set EventMask = 1 where ObjectTypeCode = 2



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



--Customer Address(post-create, post-update, post-delete)

select @entityid = EntityId from Entity where ObjectTypeCode = 1071

update Entity set EventMask = 1 where ObjectTypeCode = 1071



insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(2, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(8, @entityid, @subscriberid, 0, 1, 0)

insert into EntityEventSubscribers(EventId, EntityId, SubscriberId,

CalloutOrder, IsEnable, IsAsyncHandler) values

(32, @entityid, @subscriberid, 0, 1, 0)



I hope somebody can help me



Thx Andre Grumbach