SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Method in Entity which takes 2 input filters. Now I want to set a value in this filter. How can I do that? I already got the collection of Filters using the GetFilters() method of the MethodInstance object. I found code that shows how to set other filters, but I don't know how to set input filters.

Please advise

share|improve this question
up vote 0 down vote accepted

Thanks Guys,I got it working here is code how to do it IFilterCollection filters = mi.GetFilters(); //IParameterCollection parameters = mi.GetMethod().GetParameters(); IUserInputFilter wsIdfiler = filters[0] as IUserInputFilter; wsIdfiler[0] = 0; IUserInputFilter docIdFilter = filters1 as IUserInputFilter; docIdFilter[0] = 12345;

and here is link i get information from

Thanks Ronak

share|improve this answer

Your Answer


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.