Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Create Content Organizer Rules programatically

$
0
0


Hi,

Content Oragnizer Rules when created programatically using EcmDocumentRouterRule requires save via UI before working. I found that someone is also facing the same issue  in this post: http://social.technet.microsoft.com/forums/en-US/sharepointgeneralprevious/thread/6b750319-1370-4d6d-8973-9012145aae84

For me, It Works fine when there is no condition added. I doubt whether am doing anything wrong while configuring the condition in the below way:

                        SPField conditionField = oweb.Lists[sourceList].Fields["Name"];

                        string conditionXml = string.IsNullOrEmpty(conditionField.Title) ?

                            string.Empty : String.Format(@"<Condition Column=""{0}|{1}|{2}"" Operator=""{3}"" Value=""{4}"" />",

                      conditionField.Id, conditionField.InternalName, conditionField.Title, "is equal to", "Seema");

                        string conditionsXml = String.Format("<Conditions>{0}</Conditions>", conditionXml);

                        myContentOrganiserRule.ConditionsString = conditionsXml;

Please post Your comments on this.


Thanks,

Seema


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>