2

Working on a small project.

Task is to create a expert advice forum. Started using Discussion Board App for it. The main problem is, I want to restrict the users to make replies only upto 6. After that a mail should trigger to the one who asked the question and the one who replied that questions can not be asked further plus make that item read only.

Any one with a solution to this.? Or any alternative to this.

0

The easiest way is to create and register an ItemAdding event receiver that counts the replies of the user and cancel the save if the limit is exceeded. Alternatively, you can create your own ListFieldIterator and validate limit in the save event handler (see OnSaveHandler). See more details here, sample code is here . If you have SP 2013 (and not SP 2010 or earlier) you should set the CSRRenderMode property of the ListFormWebPart to ServerRender.

0

Pholpar, Thanks for the result. But i was working on an easier task. Finally did it.

What i actually did : As soon as we have 6 replies to a Discussion Item we change the permission to read only for everyone.(and drop a mail)

Solution:

In the workflow Choose a "if" condition (Simple if not the current item one)

DataSource : Select the Discussion list Field from Source : Replies

Field : ID Value : -> Data Source : Current Item Field from Source : Parent Item ID

and put any required condition after that.( I used to drop and email after that to stop the replies and change the view for all people to Read only)

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.