Monday, March 30, 2009

Business Object XI R2 Url Parameter Search

Hi,

Today topic is, how do i make Business Objects Search using URL Paramter,
is very easy to make a simple search, the principals parameters we need to work are:
searchText= "Text to search"
searchParam= "Type of Search"
advSearch= "Advance Search True/False"
objectPageNum= "Number of page to return"

after we create Token session authentication, we can start create simple Search.

http://[url]/businessobjects/enterprise115/desktoplaunch/InfoView/listing/reportList.do?type=all&objId=-1&searchText=teste&searchParam=name&advSearch=false&objectPageNum=0

Hope this help...

Saturday, March 28, 2009

SharePoint Web Services and Search Problem "The request failed with HTTP status 401: Unauthorized"

Hi,
Some days ago have problem, Search Crawl and SharePoint Web services, just dont Work, what come to my mind..."Anonymous access on IIS was checked", go see and was Uncheck,
Hummm.... after this i go to event Viewer and saw:


"Context: Application '[SharedServicesname]', Catalog 'Portal_Content'

Details:
Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (0x80041205); [Site]"


Ok another security problem, But where??? everythig was right and working "hate when this happen", i think "Host name problem" a litle search and i find a article that give then answer, "specify the host names that are mapped to the loopback address and can connect to Web sites on your computer", yep that was my problem....

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or IIS 6
http://support.microsoft.com/?scid=kb;en-us;896861&x=14&y=17

Friday, March 13, 2009

Integration CRM 4.0 and Sharepoint MOSS 2007 BDC, Search

Hi,

Codeplex and "Accelerators for Microsoft Dynamics CRM", have launch a excelent aplication to integrate CRM Data to SharePoint BDC and Search.

"The enterprise search accelerator allows Microsoft Office SharePoint Server (MOSS) customers to view and search for Microsoft Dynamics CRM data directly from their SharePoint portals."

Enterprise Search
http://www.codeplex.com/crmaccelerators/Release/ProjectReleases.aspx?ReleaseId=21449

Sunday, March 08, 2009

stsadm can inadvertently delete a root site collection if erroneous URL path used

Wow....

This bug never happen to me.... but is good to know

http://support.microsoft.com/kb/968474

"After using stsadm -o restore with the -overwrite parameter and getting an error you notice a site one level up from the site you were trying to restore is deleted. The root level site http://servername is deleted.

ERROR:
No content databases are available for this operation. Create a content database , and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add a content database".



Going to the now dead root site you get:
404 FILE NOT FOUND"

This can happen if you pass an improper URL path with stsadm -o restore.

EXAMPLE:
Correct - stsadm -o restore -url http://SERVERNAME/sites/sitename -filename DRIVE:\file.bak -overwrite
Incorrect - stsadm -o restore -url http://SERVERNAME/site/sitename -filename DRIVE:\file.bak -overwrite

Saturday, March 07, 2009

Sharepoint Signout Page and Command

Hi,

How many times you ask what code we need to make the signOut page, you can find the page "signout.aspx" here:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS"
there you can open the page and have Javascript code "document.execCommand("ClearAuthenticationCache");" will clear cache from you login.

There you can manage you sign out page using Custom Actions as a feature

Id="[Guid]"
Title="Feature to active Custom Log Out"
Description="Site Actions Menu Log Out Option"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
< ElementManifests >
< ElementManifest location="elements.xml">
< /ElementManifests >

On you elements Xml file you add Custom Menu Option

< id="Custom signout"
groupid="SiteActions"
location="Microsoft.SharePoint.StandardMenu"
sequence="2000"
title="Custom Sign Out Page"
description="Logout of this site">
< url="~site/_layouts/signout.aspx">
< /CustomAction >

Sunday, March 01, 2009

WebPart Connection Document Library and WebPart Picture

This is a very simple and problably have Hundreds of articles talking the same thing, but "Why not"

First create a "Document Library" , where you add your pictures.

After create, go to your webpart Page and start adding Listview "Document Library" WebPart and image WebPart.

To Webpart Connection Works, 1 WebPart have to be The Provider "Document Library" and other the consumer "Image WebPart" and we can start editing.



Edit "Picture" select "connections"->"Provide Row to"->"ImageWebPart", There you select Column "Document URL" and When you select a Row The picture will show....



One more thing, if you are using a custom List and have multiple attachments "Pictures", WebPart Connection Field "attachment" will not Work because is a "True/False" result, The workarround is you add a URL Column where you add the path to Image and then make The Webpart Connection.

Hope this help.

SharePoint Custom Action Server Postback

Well creating Custom Action"Menus, Lists, System Admin,..." on Sharepoint is very normal using "sharepoint rights" of course, "every client ask that" and normal is done easy and when we want to use some link or other Menu action call "Element.xml" when we are creating Our feature and add:
"custom action" 
     "UrlAction" -> call a custom URL can recive values from header querystring like "List"...

If we want to control the menu by code we need to register the DLL assembly on our Element.xml file use the 
"custom action" and register our class
Location="Microsoft.SharePoint.StandardMenu"
GroupId="ActionsMenu"
ControlAssembly="[Assembly]"
ControlClass="[Class Name]">

The controls we can use to add new menus are:  
[class] : WebControl
SubMenuTemplate
MenuItemTemplate

When we want to make some action on MenuItemTemplate whe have to call .ClientOnClickNavigateUrl  "prop" that call the url, but if we want a post back then we need to call:
[class]: MenuItemTemplate, IPostBackEventHandler 
and create the post back and there "Mohamed Zaki" make a great job.

PS: There are midle step we need to make but the idea is a way to create postback on Sharepoint Menus 

Hope this help

How to List Document Librarys

Hello,

You problably ask "how do i only list Document librarys?"

There are Methods will get the type of list we want to filter 
SPBaseType
SPListTemplateType

Here a litle example of how to get Document librarys
using( Spsite site = SPContext.Current.Site)
{
using(SPWeb Web = site.OpenWeb())
{
                foreach (SPList List in Web.Lists)
                {
                    if (List.BaseType == SPBaseType.DocumentLibrary && List.BaseTemplate == SPListTemplateType.DocumentLibrary)
                    {
 response.write(List.Title+"
");

                    }
                }
}
}