in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Blog for Sharepoint Hunter

A (un)managed bag of ideas, tricks, gripes about New Emerging Technologies

July 2007 - Posts

  • Windows SharePoint Services 3.0: Latest Software Development Kit (SDK)

    Last Friday Microsoft released WSS 3.0 SDK  http://www.microsoft.com/downloads/details.aspx?FamilyID=05e0dd12-8394-402b-8936-a07fe8afaffd&DisplayLang=en  The Windows SharePoint Services 3.0 SDK contains conceptual overviews, programming tasks, and references to guide you in developing solutions based on Windows SharePoint Services as a platform.

    The SDK includes information about the following technologies: 

    • Web Part Framework   Create, package, and deploy Web Parts on SharePoint sites. 
    • Server-side object model   Work with individual lists and sites or manage an entire Windows SharePoint Services deployment. 
    • Web services   Use default Web services, or create custom Web services, to interact with Windows SharePoint Services from external applications. 
    • Collaborative Application Markup Language (CAML)   Customize the schemas that define lists and sites, define queries for use with members of the object model or Web services, and specify parameters for use with methods in Remote Procedure Call (RPC) protocol.
    • Master Pages   Specify all of the shared elements of your site in the master page or pages, and add content page-specific elements to content pages.
    • Workflows   Create workflows that encapsulate business processes to be performed on items in Windows SharePoint Services, and attach those workflows to items in Windows SharePoint Services.
    • Custom Field Types   Create custom field types that conform to your business data. These custom field types can be based on the base field types already included in Windows SharePoint Services, and can include custom data validation, field rendering, and field property rendering and processing.
    • Information Rights Management (IRM)   Specify IRM for files located in document libraries and stored as attachments to list items. Create IRM protectors for your own custom file types.
    • Document Property Promotion and Demotion   Use the built-in XML parser to synchronize the document properties and list column data for XML documents. Create document parsers to do the same for your custom file types.
    • Search   Use the new Query object model and Query Web service to retrieve search results. Search in Windows SharePoint Services now shares the same SharePoint search technology used by Microsoft Office SharePoint Server 2007.  Also included is the Workflow Developer Starter Kit for Windows SharePoint Services 3.0, which helps solution providers, independent software vendors, value-added resellers, and other developers write custom workflows for Windows SharePoint Services 3.0.
    It contains the following: 
    •  Visual Studio Project Templates o    Sequential Workflow Library o    State Machine Workflow Library
    •  Sample Custom Workflow o    Simple Collect Feedback using ASPX forms

      Note: You can also view the Windows SharePoint Services 3.0 SDK online in the MSDN Library.
  • Is XML Notepad 2007 for BDC Meta Data(Application Definition) File Creation?

                  One of the hurdles in BDC development is creating XML Metadata Definition file. Microsoft has not yet provided any tool to create XML Definition file – But lot of third party products (like MetaMan, MOSS BDC Design Studio) available to create XML Definition file for BDC applications. But it can’t satisfy our BDC thrist! – If you folks would like to create it by yourself using any XML tools, then obvisouly you need to go for XML Notepad 2007. It is really wonderful tool to create/customize XML files. Which provides a simple intuitive User Interface for browsing and editing XML documents, one of the biggest new feature is IntelliSense, which is driven by XML Schema information provided via the SchemaCache. For example, if your element or attribute is defined by an XSD simpleType and this simpleType contains a list of enumeration facets, then you can select it from a drop-down.

    Screenshot:

     

    Excellent design from Microsoft Team(Chris) - See XML Notepad 2007 Design for information about how this application is built. The downloadable installer for version 2.3 is available.  

  • Pass parameter (Custom Long Url) to Infopath 2007 browser forms using BDC Custom Actions

    Last week, I got an excellent oppurtunity to work with Infopath 2007 and Business Data Catalog(BDC). As per requirement, need to pass employee personal information id to infopath forms. Infopath form should pre-populate data from DB based on PersonalInfoID from Querystring.  Whether i pass a parameter to a form file in InfoPath 2007 or the Web browser, first i need to update the form template's Loading event. The LoadingEventArgs class of the Loading event provides the InputParameters property. This property gets an IDictionary object, which contains any input parameters that are specified in the URL that is used to start a form file. Next, use the TryGetValue method of the IDictionary object that was returned by the InputParameters property to retrieve a parameter value. Then, use the SetValue method on an XPathNavigator object to set the corresponding node value in the form file. The following example sets the Employee Name box to the value based on PersonalInfoID parameter that was passed in the URL that was used to start the form.  public void FormEvents_Loading(object sender, LoadingEventArgs e) {

    string personalInfoId = string.Empty;

    try    

    e.InputParameters.TryGetValue("PersonalInfoID", out personalInfoId);  

    } catch (Exception ex) {

    personalInfoId = ex.Message.ToString();

    } finally {

     …do some db calls…

    MainDataSource.CreateNavigator().SelectSingleNode ("/my:myFields/my: Name", NamespaceManager).SetValue(customerId);

    }

    Next, I must update the Business Data Catalog metadata file to include a custom action. So I’ve added as follows, which adds a custom action to the existing Employee entity (before the </Entity> end tag) that starts the status report form in the Web browser with a PersonalInfoID parameter.

    <Actions>   

        <Action Name="Status Report" Position="1" IsOpenedInNewWindow="true" Url=      "<i>My MOSS Server</i>/_layouts/formserver.aspx?xsnlocation=       /formservertemplates/statusreport.xsn&      openin=browser&PersonalInfoID={0}">       

      <ActionParameters>           

                      <ActionParameter Name="personalInfoID" Index="0"/>       

        </ActionParameters>   

      </Action>

    </Actions>

    Now, if I would like to add save location(which user can save the form after submited to DB) as follows 

    http://mossserver/Employee Info/HR Response/Credit Response/Check In/_layouts/FormServer.aspx?XsnLocation=http://mossserver/FormServerTemplates/StatusCheck-In.xsn&SaveLocation=http://mossserver/Employee Info/HR Response/Credit Response/Check In /Personal CheckIn&Source=http://mossserver/Employee Info/HR Response/Credit Response/Check In /Pages/default.aspx&DefaultItemOpen=1&EmployeeID={0}&DeptID={1}&ContactInfoID={2}&LocationID={3}&CaseID={4}&StatusId={5}   - Kindly note that, I’ve long URL which more than 675 characters. If we would like to add this URL into our custom action, BDC services turncated longest URL because of MaxLength.Now, how we can resolve this problem? – I got an idea, why don’t to apply URLMapping functionality to this scenario. So finally I’ve added URL Mapping element to Web.Config as follows:      

     <urlMappings>        

                      <add url="~/sample.aspx" mappedUrl="~/_layouts/FormServer.aspx?XsnLocation=http://mossserver/FormServerTemplates/StatusCheck-In.xsn&SaveLocation=~/Employee Info/HR Response/Credit Response/Check In /Personal CheckIn&Source=~/Employee Info/HR Response/Credit Response/Check In /Pages/default.aspx&DefaultItemOpen=1&EmployeeID={0}&DeptID={1}&ContactInfoID={2}&LocationID={3}&CaseID={4}&StatusId={5} " />     

        </urlMappings> 

    Ahrr….Finally, we solved the problem by adding URL mapping. Hatzz off to ASP.NET team J

    Also, here’re some pointer really help me to solve this issue.

    http://msdn2.microsoft.com/en-us/library/bb406004.aspx 

    http://wm.microsoft.com/ms/msdn/office/2007officevisualhowtos/infopathparameters.wmv - Excellent videocast regarding this context 

  • Meeting with MTC(Microsoft Technogy Center) Folks

    I got a chance to sit with Microsoft Folks abt BDC and Infopath Issues. Let me keep posted once i got an full update from Microsoft.

    P.S: Due to site restrictions, i'm attaching excel sheet to get clear view.

    Issue Scenario Microsoft Recommendation
    BDC Filtering Multiple Filtering is unavailable on the BDC SharePoint List Web Part.  On a regular SharePoint List filtering is available.   Not possible/available or cannot be done
    Filter Pattern Re-arrangement  Search parameters are fixed to “is equal to”, “starts with”, “ends with” and “contains”.  We would like to change the order in which these appear in the menu and/or remove some parameters.  In our interface “is equal to” would hardly be used; however, it is the first option available.  In fact, we may want to only use “contains”.   Not possible/available or cannot be done
    Lack of handling Co-related sub queries   The BDC does not handle joining of tables together unless a joined view is provided by the database.  That is not what is desired.  Basically, without this capability within the BDC layer, a parent child relationship requires this relationship to be displayed in two web parts (i.e. one parent web part and one child web part).   We would like to have a single joined view displayed in the user interface and have that join performed in the BDC layer. 
    Not possible/available or cannot be done
    Parent Child Relationship If a parent / child relationship is used using two web parts, the search on the parent does not update the results of the child web part.   Thus, if the results of the search change the display of the parent, then what is shown in the child web part is inaccurate.  Only when you select an item from the parent web part, the child web part is updated.  This causes confusion to the end user.   It's a bug in BDC Architecture
    More than 4 or more criteria Exception Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Input string was not in a correct format.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:

    [FormatException: Input string was not in a correct format.]
       System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2751827
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
       System.Int32.Parse(String s, IFormatProvider provider) +22
      
    Microsoft.SharePoint.Portal.WebControls.Filter.FromEncoded(String encodedName, String encodedOp, String value) +221
      
    Microsoft.SharePoint.Portal.WebControls.BusinessDataListWebPart.filterFindButton_Click(Object objSender, EventArgs ea) +894
       Microsoft.SharePoint.Portal.WebControls.PostbackLink.OnClick() +59
       Microsoft.SharePoint.Portal.WebControls.PostbackLink.RaisePostBackEvent(String eventArgument) +54 Microsoft.SharePoint.Portal.WebControls.PostbackLink.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102




    It's a bug in BDC Architecture
    BDC not handling sharepoint groups  In the ACL permission list found in the Application Definition File (Meta Data) for BDC LOB, it only displays NT Groups and not our SharePoint Groups, this limits our control of user access.  Other parts of SharePoint do allow using SharePoint Security Groups.   Not supported/ Cannot be done
    Attachments not suppoted  The BDC does not support attaching images (for example) so that these images can be displayed as part of the BDC SharePoint List table view.  SharePoint list do allow embedded images, but the BDC does not support it.   Not possible/available or cannot be done
    Tooltip produces headache in Infopath browser-enabled forms Tool tips cover the field names when displayed in InfoPath 2007 Browser-Enabled Webpage.  There appears to be no way to control the display of tool tips.   Not possible in Infopath but you can done by custom javascript
    Attachments cannot be published in Infopath If the InfoPath form has an attachment, the attachment is embedded within the form XML.  We would like to be able to place this attachment as a separate field in the forms library, but it does not appear possible.  Error Message: The selected field cannot be promoted because its data type is not supported: base64Binary Not possible and cannot be done
    Not able to connect between sharepoint list(instead of Forms Library) and Infopath It does not appear possible to link an InfoPath form to a SharePoint list.  Instead of having the default forms view used with SharePoint, we would like to use InfoPath forms.  Thus, the NEW option from a SharePoint list does not give us the flexibility required by our users.  Our users like to see more formal forms and InfoPath could provide that, but we can’t seem to interface a SharePoint List with an InfoPath form.   Not possible and cannot be done
    BDC Scability/Performance Issues In general, we find slow/low performance when using the BDC.  What are potential areas that performance may be degraded by using the BDC?      
    Custom Action with Long URL   I would like to add an custom action which should redirect to Infopath Browser URL with Parameter from BDC. I've added a custom action and URL(Longest URL) - If i view this custom action in Business Data Catalog, it truncating my URL. I hope it has some limited size for URL field. I would appreciate if you any one can suggest me a way to achive this task?

    Shorter version: I need to pass a parameter from BDC to Infopath(obvisouly Infopath Form Services Browser URL would be a Longest URL Path). If i assign this Longest path to custom action, It's not accepting....
    e.g: - http://servername/subsite1/subsite1of1/subsite1of1of1/subsite1of1of1/_layouts/FormServer.aspx?XsnLocation=http://servername/subsite1/subsite1of1/subsite1of1of1/subsite1of1of1/FormServerTemplates/PersonalCheckIn.xsn&SaveLocation=http://servername/subsite1/subsite1of1/subsite1of1of1/subsite1of1of1&Source=http://servername/subsite1/subsite1of1/subsite1of1of1/subsite1of1of1/Pages/default.aspx&DefaultItemOpen=1&PersonalInfoId=1223&NTID=bp1\smi434&CheckInID=123&LocationID=12&ContactInfoID=123&StatusID=1&CrisisID=1

    It's a bug in BDC Architecture


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts