Tuesday, March 12, 2013

Get SharePoint Users List from Infopath Form People Editor

Today I am doing some R & D with Infopath form & workflow. I want to pass multiple users from Infopath to workflow for multiple users' task creation.

I have searched on google but not getting proper result for above. That's why I have decided to write this post for other user's help.

See below image for visualization.

 

 








Now, fire button click & add below code.

        public void btnGetUsers_Clicked(object sender, ClickedEventArgs e)
        {
            // Write your code here.
            XPathNodeIterator sentToIterator = MainDataSource.CreateNavigator().Select("/my:myFields/my:reviewersGroup/pc:Person/pc:AccountId", NamespaceManager );
            string result = "";
            int count = 1;
            foreach (XPathNavigator selectedNode in sentToIterator)
            {
                if (count < sentToIterator.Count)
                {
                    result += selectedNode.InnerXml +"; ";
                    count++;
                }
                else
                {
                    result += selectedNode.InnerXml;
                }
            }
        } 
Happy SharePointing...!!!

Saturday, March 2, 2013

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)

Today I am trying to open my SharePoint port 80 Site in my Laptop which has installed window 7 Ultimate 64 bit OS.

But can't open site in browser so I have checked IIS Manager and seen port 80 site is stopped. So I have tried to start that site but can't start and error fire as below.

Error: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)  

Cause: After few minutes of research, I have seen one problem. Problem was Skype is by default use port 80 that's why I faced the issue.

Resolution: Go to Skype > Tools > Advance (left side Tab) > Connection > Now unchecked port 80 as per below screen.









Happy SharePointing...!!!