Ameet's profileWelcome to Ameet Phadnis...PhotosBlogListsMore Tools Help

Welcome to Ameet Phadnis's Technical Blog Entries

July 16

SQL SP Generator wins 5 stars award from Soft32 Dowload

Soft32 Download finds SQL SP Generator 1.0 a high quality product and awards it a 5 star award and is also listed as a Premium Software.

I wish I can check all my company emails everyday. Anyways, we recently found that our SQL SP Generator has won 5 star award from Soft32 downloads. Please visit Soft32download site for more information

e Tek Global Inc. is back into Action

After being sold to another company last year, we recently bought back e Tek Global and has created a complete independent entity. We have also included one more partner in this new venture. The name of the partner is Leonard Mwangi, frequent speaker at SharePoint Conferences.
 
As soon as we purchased back e Tek Global, we have signed some major contracts with major clients in last one month. It is going to be exciting time for us now. We are also opening a facebook / twitter account to publish whats going at e Tek Smile
 
Watch this space for frequent updates on e Tek Global too.
April 16

SharePoint 2007: Access Denied when Crawling.

Today morning I got a call from one of our clients that my favorite Type Ahead Directory Search was not working. I mean to blog about it some day. I was so disappointed that after working so hard on the Type Ahead Directory Search to use the User Profiles it has stopped working abruptly.
 
So, we started with the User Profiles and of course we had around 621 User Profiles. The same amount of User Profiles we had yesterday. Then we looked into the Search Crawl and realized that the crawling was not working. So we looked into the Crawl logs because it had bunch of errors. The error was ACCESS IS DENIED. Now I am not a server / security guy so that was a big issue for me. Smile To top my limited server and security knowledge my coworker decided that the client needs to go with Windows 2008 server. After reviewing further I found out that the Windows Updater had installed various kinds of security updates on the Server Angry .
 
One thing I AM really GOOD AT is GOOGLE SEARCHING Wink. Thats when I ran accross Steve Graegert's blog on SharePoint Web Service Reference Authentication Error. I could relate to his issue with mine. Even though the blog is meant for Windows 2003 SP 1 it does work for Windows 2008.
 
I hope if someone runs into similar kind of issue they would be able to fix it as mentioned in the blog.
 
Good luck.
February 25

Deleting an Item from the list

Here is the code for deleting an item from the SharePoint List. Make sure you have referenced C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll
 
            SPSite siteCollection = new SPSite("http://moss");
            SPWebCollection sites = siteCollection.AllWebs;
            foreach (SPWeb site in sites)
            {
                SPListCollection lists = site.Lists;
                foreach (SPList list in lists)
                {
                    if (list.Title == "AmeetList")
                    {
                        foreach (SPListItem listItem in list.Items)
                        {
                            if (listItem["AmeetListID"].ToString() == "1")
                            {
                                listItem.Delete();
                                //listItem.Update();
                                break;
                            }
                        }
                    }
                }
 

Updating an Item in the list

Few days back I had posted on how to add item to a SharePoint list. I completely forgot about giving the update code till one of my clients informed me that I still owed everyone this code. Make sure you have referenced C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll So here it goes. If you are looking at updating the data from the database the the place where I am checking AmeetListID value can be checked against your database unique key values.
 
SPSite siteCollection = new SPSite("http://moss");
            SPWebCollection sites = siteCollection.AllWebs;
            foreach (SPWeb site in sites)
            {
                SPListCollection lists = site.Lists;
                foreach (SPList list in lists)
                {
                    if (list.Title == "AmeetList")
                    {
                        foreach (SPListItem listItem in list.Items)
                        {
                            if (listItem["AmeetListID"].ToString() == "1")
                            {
                                listItem["Title"] = "Ameet Testing 1";
                                listItem.Update();
                                break;
                            }
                        }
                    }
                }
            }
February 09

e Tek Global releases SharePoint Site Map

e Tek Global Inc. has released its own SharePoint Site Map Web part which is much improved version of SharePoint Out of Box Table of Contents.
 
 
 
January 19

SP Object and updating Lists

Most of the clients have been asking me how do I update my list with some data from SQL Server. There are two ways in which you can accomplish this. The first method is using the SharePoint Objects on the server or using the Web Services. If you are writing some code that is going to reside on the server then you would be good with using the SharePoint Objects.
 
Before you begin coding you need to do the following -
1. Create your Windows application or any of your project type in Visual Studio.
2. Refer the Microsoft.SharePoint assembly in your project. The SharePoint library will be situated on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll
 
To add an item to the list you can use the following code -

Dim siteCollection As SPSite = New SPSite(http://moss)
Dim sites As SPWebCollection = siteCollection.AllWebs
Dim site As SPWeb
For Each site In sites
Dim lists As SPListCollection = site.Lists
Dim list As SPList
For Each list In lists
    If list.Title = "AmeetList" Then
     
Dim spNewListItem As SPListItem = list.Items.Add()
      
spNewListItem(
"Title") = "Ameet Testing"
     
spNewListItem("AmeetColumn5") = "Ameet Testing Adding"
     
spNewListItem.Update()
    End If
Next

In the above example I am trying to search for the list called AmeetList and Add a new Item. I have a custom column called AmeetColumn5 and I am setting a value for that too. In the next blog I will explain how to update an existing entry. The above code is just an example on how to loop through sites and how to loop through lists to reach the right list and then add an item.

 
January 10

FullTextSQLQuery and DateTime in MOSS 2007

I was working on the federated search project for a client and ran into a major issue with searching on datetime. I am using the FullTextSQLQuery to search for the data. There were multiple issues which I ran into -
1. I was using BDC to import their LOB application data into SharePoint. In my BDC XML I had declared one field as DateTime but for some reason I was not able to MAP a property to the DateTime field. Thats when I realized that the server did not have MOSS SP1 which fixes this issue. So, got resolved that issue.
2. The next big issue was how do I filter the results based on the datetime field. The date field was a parameter passed to the search. So, the results that were being returned back were anything that is greater than the parameter date entered. After much researching I found out that I was passing the date as mm/dd/yyyy. But SharePoint Search allows only yyyy/mm/dd or yyyy-mm-dd. So, I had to format my code based on this and wow it worked. Please review the following link in case you are stuck on how to use certain conditions in Enterprise Search
 
 
Happy Coding :)
December 12

e Tek Global Inc. announces the release of SharePoint DRP Solutions for their clients

What is e Tek Global's SharePoint Dedicated Resource Program?

e Tek Global's SharePoint Dedicated Resource Program (DRP) is a cost saving benefit for customers, which is a pre-defined contract service offering delivered by our SharePoint consultants to develop, deploy or even maintain the SharePoint services. This service offers customers a 3, 6 or 12-month minimum hours per month SharePoint support, new development, workflow and deployment related consulting. Customers will work with a assigned Microsoft Certified consultants to maintain, develop or administer the SharePoint environment. This service will provide cost saving and quality service to the customer as they implement the SharePoint infrastructure.

You can read more about DRP at e Tek Global's Website.

December 06

Checking in InfoPath Form whether certain user belongs to SharePoint User Group

Just recently I was tasked by a client to come up with a solution that would check whether an user existed in a certain SharePoint Group and if it exists then hide a certain control. After various googleing I could not come up with a solution but I found small bits here and there which allowed me to come up with a solution for the client. The key was to use the http://<MOSS site>/_vti_bin/usergroup.asmx web service. But I had to check whether the user belonged to certain SharePoint User Group. so, I followed these steps to create a Web Service Method in their current Web services Project.

public String IsMOSSUserGroup(String employeeUserName)
{
try
{
MOSSWebService.
UserGroup objWebService = new MOSSWebService.UserGroup();
objWebService.Credentials = System.Net.
CredentialCache.DefaultCredentials;
System.Xml.
XmlNode ndGroups = objWebService.GetGroupCollectionFromUser(employeeUserName);
Boolean blnFound = false;
String strGroup = ConfigurationManager.AppSettings["MOSSUserGroup"];
foreach (System.Xml.XmlNode xmlGroup in ndGroups.ChildNodes[0].ChildNodes)
{
if (strGroup == xmlGroup.Attributes["Name"].Value)
{
blnFound =
true;
}
}
if (blnFound == true)
{
return "Yes";
}
else
{
return "No";
}
}
catch (Exception ex)
{
return ex.Message;
}

  • Opened Web.Config file and added an appsetting for MOSSUserGroup and the value was set to appropriate group.

    Once the above web Service was compiled I published the Web Service to the appropriate location. The next step was to modify the InfoPath Form. Following were the steps that were performed -

    • In Design mode - Click on Tools->Data Connections
    • Click the Add button.
    • On the Data Connection Wizard, select Create a new connection to and select Receive Data. Click Next.
    • Under Select the source of your data, select Web Service. Click Next.
    • In the Web Service Details I entered the Web Service URL.Click Next.
    • In the operations list, select IsMOSSUserGroup. Click Next.
    • In the Parameter section do not do anything. Click Next.
    • Make sure the checkbox for Store a copy of the data in the form template is unchecked. Click Next.
    • Enter Suitable Name for the data connection and select the Automatically retrieve data when form is opened. Click Finish.

    Now the data connection was created to query the Web Service. The next step was to set a field on the InfoPathForm to the returned value. The returned value was going to be either Yes or No. To do this follow these steps -

    • In Design mode - Click Tools-.Form Options
    • On the category list, select Open and Save.
    • On the Open and Save screen, Click on Rules.
    • On Rules Dialog box, Click Add.
    • On the Rule Dialog box, enter suitable name.
    • Click Add Action.
    • In the Action Drop down list select -> Set a field's value.
    • In the Field box, click on the button.
    • Under Select a Field or Group, change the Data Source to the Data Connection you created above. In my scenario it was IsMossUserGroup.
    • Under the Fields information, expand queryfields and expand tns:IsMOSSUserGroup and select employeeUserName.
    • Click Ok.
    • Now the field text box will be populated with employeeUserName.
    • Now on the Value, I selected the userName.
    • Click Ok.
    • Click Add Action again.
    • Now under the Action dropdown select Query using a data connection.
    • Under Data Connection dropdown list select the data connection that was created.
    • Click ok
    • Click Add Action again.
    • Now under the action dropdown select set a field's value.
    • For Field Select the field that was created to store the result of the above query.
    • On the Value, you will need to select the secondary data source field under datafields. In my scenario it is IsMossUserGroupResult.
    • Click ok.
    • Click ok.
    • click ok
    • Now the rule is created with three actions.

    Thats it. Once the above field is set you can use the field in your form to hide or display controls or whatever logic you have.

    Simple right Smile

     

  • November 25

    e Tek Global is an approved SDPS Service Provider

    e Tek Global qualifies as an Microsoft SharePoint Deployment Plannning Services provider. Microsoft SharePoint Deployment Planning Services (SDPS) is a software assurance benefit for customers, which is a pre-defined paid service offering delivered by partners to plan an effective SharePoint deployment. Visit e Tek Site for more information
    November 19

    Getting User Information in InfoPath Form

    Are you interested in pulling User Related Information into InfoPath form. Please review the following link -
     
     
     
    November 11

    Am Microsoft Certified Technology Specialist

    I have finally completed the following MCTS requirements
     
    Microsoft Office SharePoint Server 2007: Configuration
     
    Microsoft Office SharePoint Server 2007 Application Development
     
    So, now e Tek Global is Microsoft SDPS certified.
    November 10

    InfoPath and Workflow Training Courseware Uploaded

    Our courseware for InfoPath Training has been uploaded to http://www.etekglobalinc.com/Training/InfoPathandWorkflowTraining/tabid/128/Default.aspx

    Seats are limited. This is at the Microsoft Office in Overland Park KS.

    November 06

    InfoPath and Workflow Training coming to Overland Park Kansas

    We are ready to come up with our own training for InfoPath and Workflow. This training will be conducted at the Microsoft office in Overland Park KS on December 18th and December 19th. More information will be uploaded on www.etekglobalinc.com. Anyone interested in getting practical training on InfoPath and Workflow needs to attend this training.

    SharePoint Site Usage Analysis

    Are you interested in finding out more about who is visiting your site and get more information on the Usage of your SharePoint site, you might have to consider using our SharePoint Site Usage product. I just recently did our product demonstration at the Microsoft Overland Park office. Please follow this link to download the powerpoint presentation.
     
     
    Unfortunately you have to register or have an account with e Tek Global to view this presentation. This is done to keep track of who is downloading the presentation.
     
     
    April 27

    SQL SP Generator for only $9.95

    The Dev Connections special is still going on.
     
    Get your copy of SQL SP Generator add in for SQL Management Studio 2005 at e Tek Global Web site or buy it at Snowcovered.com. Don't forget the DevCon1 code for your discount.
     

    Back from SharePoint Connections

    Wow! What an experience.
     
    I was one of the speakers at the conference. This was one of the best experiences to speak in front of professionals. The Dev Connections people know how to organize a great show. I spoke on
    • Search for Employees
    • Show My Data with BDC
    • Programming with Web Services and Objects.

    I will be posting some of the tips and tricks on the blogs soon.

    I am just getting out of the vacation mode and getting ready for work again.

     
     
    December 25

    e Tek Global Launches its offshore unit in India

    e Tek Global Inc. has opened its India office in Pune. The offshore unit will be named e Tek Solutions. e Tek Solutions will be a fully owned subsidary of e Tek Global Inc. USA. Watch e Tek Global Inc.s website for more information that will be coming up soon.
     

    Meet e Tek Global face to face at Dev Connections Exhibitor's space

    e Tek Global is launching its Reporting product in the month of February. Come and see a demo and get a copy of the demo at the Dev Connections conference in Orlando FL.
     
    Watch this post for more information about the Exhibitor location.
     

    Off to Dev Connections

    I will be speaking at Dev Connections Spring 2008.
     
    I will be speaking on the following topics -
     
    Search for Employees
    Employee / People search is the most important aspect of any corporate intranet site. The returned information and the display of the information might vary from company to company. The source of information may come from Active Directory or from some other data source. SharePoint already provides Web Parts to display and search the employee information. This session explains all the aspects of employee / people search. Learn how to import the user information into User Profiles and customize the out of box search results Web Parts to display the employee information. And if the out-of-box results web part customization doesn't suite your needs then learn how to create your own Web Parts using the Office Search objects. This session will assist the Intranet developers to implement people search the way your company expects their intranet employee / people search to work.

    SharePoint Programming Objects and Web Services
    Understanding the various SharePoint Objects and Web services is vital to programming your Web Parts or your application to utilize the SharePoint information. Developers need to have detailed understanding about the options available to utilize SharePoint information. This session starts with explanation about the different namespaces for SharePoint objects. It provides you some examples of using the objects to pull information from SharePoint sites. Then dive into retrieving information using objects from the shared services site. Once comfortable with this programming, then learn how to enhance your own application by pulling information from SharePoint using Web services. This session will get the serious developers kick started on programming with SharePoint.

    HDV114: Show My Data with BDC
    With the introduction of BDC (Business Data Catalog) in MOSS 2007, SharePoint makes it easy to display proprietary application information on SharePoint sites. No need to create your own customized Web Parts to display this information. This session starts with explanation about BDC and different sources through which the developers can pull data. Once the concepts are clear on creating BDC, then learn about the out-of-the-box Business Data Web Parts provide. If you are more adventurous, you'll learn some more tricks and tips with the Web Parts. Finally, the session ends with "What all can you do with BDC?"

    November 05

    Interested in viewing the XML data Core Results Webpart

    Use the following code -
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="
    http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xmp><xsl:copy-of select="*"/></xmp>
    </xsl:template>
    </xsl:stylesheet>
     
    This should list the data completely in XML format.
    September 28

    Disappearing List Information

    I recently created a site definition for one of e Tek Global's clients. I followed the steps mentioned in some blogs. I don't remember which blog was it.
     
    After creating the sites using the site templates the site wouldn't display the lists to be created. In short if you go to Create New List item it wouldn't display some of the list items like announcements, survey etc. It used to display only a few things. After further research I found out that the site definition's onet.xml file was missing the following tags in WebFeatures section.
     
    <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5">
                    </Feature>
     
    As soon as I added the above tag and created a new site based on the new site definition I got all my lists back. But the main issue was how do I make other sites have the list. I couldn't find a easy way out. I checked the database and found out that SharePoint stores this information in two tables - Webs and Features. The tables are related by the ID column in Webs. So you can use the following SQL Code to get more information on the features that are activated for your site

    SELECT

    ID FROM webs Where Fullurl = '<your site information>'

    SELECT

    * FROM Features Where WebID = 'C068C5C0-6846-48DC-9CF8-1C8B268F847E'

    If you didn't have the feature id in your onet.xml file then most probably you will have only 8 items in the list opposed to 23 items. You need to find the webid that has all the items and then create a insert statement to add the remaining items.

    The feature ids for most commonly used items are -

    Libraries

    Document Library
    FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}
    ListTemplate=101
    Form Library
    FeatureId={00bfea71-1e1d-4562-b56a-f05371bb0115}
    ListTemplate=115
    Wiki Page Library
    FeatureId={00bfea71-c796-4402-9f2f-0eb9a6e71b18}
    ListTemplate=119
    Picture Library
    FeatureId={00bfea71-52d4-45b3-b544-b1c71b620109}
    ListTemplate=109
    Report Library
    FeatureId={2510d73f-7109-4ccc-8a1c-314894deeb3a}
    ListTemplate=433
    Translation Management Library
    FeatureId={29d85c25-170c-4df9-a641-12db0b9d4130}
    ListTemplate=1300
    Data Connection Library
    FeatureId={00bfea71-dbd7-4f72-b8cb-da7ac0440130}
    ListTemplate=130
    Slide Library
    FeatureId={0be49fe9-9bc9-409d-abf9-702753bd878d}
    ListTemplate=2100


    Communications

    Announcements
    FeatureId={00bfea71-d1ce-42de-9c63-a44004ce0104}
    ListTemplate=104
    Contacts
    FeatureId={00bfea71-7e6d-4186-9ba8-c047ac750105}
    ListTemplate=105
    Discussion Board
    FeatureId={00bfea71-6a49-43fa-b535-d15c05500108}
    ListTemplate=108

    Tracking

    Links
    FeatureId={00bfea71-2062-426c-90bf-714c59600103}
    ListTemplate=103
    Calendar
    FeatureId={00bfea71-ec85-4903-972d-ebe475780106}
    ListTemplate=106
    Tasks
    FeatureId={00bfea71-a83e-497e-9ba0-7a5c597d0107}
    ListTemplate=107
    Project Tasks
    FeatureId={00bfea71-513d-4ca0-96c2-6a47775c0119}
    ListTemplate=150
    Issue Tracking
    FeatureId={00bfea71-5932-4f9c-ad71-1557e5751100}
    ListTemplate=1100
    Survey
    FeatureId={00bfea71-eb8a-40b1-80c7-506be7590102}
    ListTemplate=102

    Custom Lists

    Custom List
    FeatureId={00bfea71-de22-43b2-a848-c05709900100}
    ListTemplate=100

     
     
    Thanks for visiting!
    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Mac Ladewrote:
    Interesting articles. Worth revisiting. Please keep on adding your ideas and experience.
    Feb. 6

    Ameet Phadnis

    Occupation
    Interests
    I mainly work in Microsoft Area. I am the Executive Vice President of e Tek Global Inc. a Microsoft Gold Certified Partner Consulting Company. We specialize in SharePoint, .NET and SQL Server consulting. I love automation of development and try to come up with some sort of tools to automate my development.
    List of all the articles I have written

    Weather

    Loading...