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

Is it possible to check if the user has enough permissions to complete task in InfoPath 2010 task form? Or maybe it is possible to show to user read-only view if he has lack of the rights.

The full description of my problem:

Task: approve absence of Pupil by Teacher and if approved add absence to SAP.

I am using next approach: When Teacher press the "Approve" button in InfoPath, first of all I invoke WebService to add record in SAP, and after it I submit the form.

Problem in my approach: if Pupil opens Teacher's task form he can press the "Approve" button and WS will be invoked, but the submiting of form fails, because Pupil can't complete Teacher's task. And, I don't know, how to forbid to invoke WS if there is a lack of the rights.

Possible solutions:

  1. I think, that the better way in my case is to use code not in InfoPath, but in VS. But my WF is created in SPD. In such case I could create custom activity for SPD to invoke WS (or add absence to SAP), but it is an additional module, and I don't want to create it without necessity.
  2. I think it is possible, to do such action using code in InfoPath. But I don't know if it possible to add code to my task form, because I created WF in SPD.
  3. May be I have to do something with user rights (to show read-only view for users with lack of rights).

But may be there is another possibility to do such typical action in SP?

Any suggestions are very appreciated.

share|improve this question
    
Thanks for marking my answer as best one but I asked to delete it since it really did not provide any solution but just commented on some specifics of Infopath form usage. –  Gennady Vanin Novosibirsk Oct 26 '12 at 3:10
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.