3

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.

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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