How to programmatically enable Post Import Actions during importing a solution?
-
יום שלישי 27 מרץ 2012 08:44
I've been developing a tool to automate importing a solution programmatically as part of build automation, although I can't find a way to specify that the Post Import Action (Activate any processes and enable any sdk message processing steps included in the solution) will be performed. How can I specify that in the code? Thanks in advance!
Here is the code that I'm using for importing a solution (from the sdk)
byte[] fileBytesWithMonitoring = File.ReadAllBytes(solutionName);
ImportSolutionRequest impSolReqWithMonitoring = new ImportSolutionRequest()
{
CustomizationFile = fileBytesWithMonitoring,
ImportJobId = Guid.NewGuid()
};
organizationProxy.Execute(impSolReqWithMonitoring);
ImportJob job = (ImportJob)organizationProxy.Retrieve(ImportJob.EntityLogicalName, impSolReqWithMonitoring.ImportJobId, new ColumnSet(new System.String[] { "data", "solutionname" }));
כל התגובות
-
יום שלישי 27 מרץ 2012 14:45מנחה דיון
I can see in the members of the ImportSolutionRequest that there is a flag for enabling workflows, but I don't see one for the plugins and such. See below:
They are enabled programmatically though by setting their state to active in code and there is no reason this could not be done after the import in code.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- הוצע כתשובה על-ידי Jamie MileyMVP, Moderator יום שלישי 27 מרץ 2012 14:45
- סומן כתשובה על-ידי Joy Chua שבת 31 מרץ 2012 16:08
-
שבת 31 מרץ 2012 16:09I missed that. Thanks for pointing that out! Yes, I do enable the plugins after the import via code. Thanks again :)