Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating a content organizer rule using code.

My code is able to create the rule in the content organizer rule list, however its condition is not set.

I have set the condition using following code.

RouterRule.ConditionsString = String.Format("<Conditions>{0}</Conditions>", strConditionXML);

RouterRule.Update();

strConditionXML = Condition Column='bdf6f34h-007c-43c4-a445-847cca2f9b3c|Name|Account' Operator='equals'   Value='India-Mumbai' />

The "Name" column mentioned above is Site Column in "Document Set" Content type.

But when I execute this code, rule is created but it does not set the condition. The condition is empty.

It sets all other fields [enabled, priority, name, content type name etc.] properly.

Has anyone faced this issue earlier.

Any suggestions would be highly appreciated.

share|improve this question
add comment

1 Answer 1

Maybe do it like this?

Try

'<Conditions><Condition Column="9ce114d1-0f9d-4825-8a74-a9fc891723c2|ProjectId|Project Id" Operator="IsEqual" Value="123456" /></Conditions>'

For example. Also, the Field name is case sensitive so watch out!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.