Answered by:
Codeplex Incremental Numbering

Question
-
Hi,
Has anyone altered the incremental numbering plugin on codeplex http://crmnumbering.codeplex.com/ so that it works in the child pipeline? I'm afraid it's a little beyond my programming skills.
I urgently need help to be able to incrementally number invoices created from opportunities, but the plugin runs in the parent pipeline so will not work in this senario.
Thanks in advance,
Rory
Friday, June 25, 2010 3:12 PM
Answers
-
Hi,
It's better to refer
http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html
http://msdn.microsoft.com/en-us/library/cc151083.aspx
After refering these you should be able to modify it yourself only. it's not that much different, you just need to make sure about some points
Mahain- Proposed as answer by Muhammad Ali Khan Friday, June 25, 2010 3:23 PM
- Marked as answer by Rory Palmer Tuesday, June 29, 2010 12:27 PM
Friday, June 25, 2010 3:19 PMModerator -
u just have to replace one line.
ICRMService crmService = context.CreateCRMService();
with
CRMService crmService = CreateCRMService(context,true);
private CrmService CreateCrmService(IPluginExecutionContext context, Boolean flag)
{
CrmAuthenticationToken authToken = new CrmAuthenticationToken();
authToken.AuthenticationType = 0;
authToken.OrganizationName = context.OrganizationName;
// Include support for impersonation.
if (flag)
authToken.CallerId = context.UserId;
else
authToken.CallerId = context.InitiatingUserId;
CrmService service = new CrmService();
service.CrmAuthenticationTokenValue = authToken;
service.UseDefaultCredentials = true;
// Include support for infinite loop detection.
CorrelationToken corToken = new CorrelationToken();
corToken.CorrelationId = context.CorrelationId;
corToken.CorrelationUpdatedTime = context.CorrelationUpdatedTime;
corToken.Depth = context.Depth;
RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM");
service.Url = String.Concat(regkey.GetValue("ServerUrl").ToString(), "/2007/crmservice.asmx");
service.CorrelationTokenValue = corToken;
return service;
}
Muhammad Ali Khan
http://malikhan.wordpress.com- Marked as answer by Rory Palmer Tuesday, June 29, 2010 12:26 PM
Friday, June 25, 2010 3:24 PM
All replies
-
Hi,
It's better to refer
http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html
http://msdn.microsoft.com/en-us/library/cc151083.aspx
After refering these you should be able to modify it yourself only. it's not that much different, you just need to make sure about some points
Mahain- Proposed as answer by Muhammad Ali Khan Friday, June 25, 2010 3:23 PM
- Marked as answer by Rory Palmer Tuesday, June 29, 2010 12:27 PM
Friday, June 25, 2010 3:19 PMModerator -
u just have to replace one line.
ICRMService crmService = context.CreateCRMService();
with
CRMService crmService = CreateCRMService(context,true);
private CrmService CreateCrmService(IPluginExecutionContext context, Boolean flag)
{
CrmAuthenticationToken authToken = new CrmAuthenticationToken();
authToken.AuthenticationType = 0;
authToken.OrganizationName = context.OrganizationName;
// Include support for impersonation.
if (flag)
authToken.CallerId = context.UserId;
else
authToken.CallerId = context.InitiatingUserId;
CrmService service = new CrmService();
service.CrmAuthenticationTokenValue = authToken;
service.UseDefaultCredentials = true;
// Include support for infinite loop detection.
CorrelationToken corToken = new CorrelationToken();
corToken.CorrelationId = context.CorrelationId;
corToken.CorrelationUpdatedTime = context.CorrelationUpdatedTime;
corToken.Depth = context.Depth;
RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM");
service.Url = String.Concat(regkey.GetValue("ServerUrl").ToString(), "/2007/crmservice.asmx");
service.CorrelationTokenValue = corToken;
return service;
}
Muhammad Ali Khan
http://malikhan.wordpress.com- Marked as answer by Rory Palmer Tuesday, June 29, 2010 12:26 PM
Friday, June 25, 2010 3:24 PM