Thursday, July 21, 2011

Trouble shooting sharepoint 2010 with Correlation ID

in Sharepoint 2003, 2007  it is quite chanllenge to trace the error, when the operation or service crash.


there is a some improvement in sharepoint 2010, when the error occurs, the error message is still very short, but it will show you the correlation ID, which is the GUID that which is automatically generate by the sharepont web server upon each request.

you can use this correlation ID and go into the sharpeoint Log to find out which the root cause of this error.

here is the path of Shareoint LOG

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

Open the Log File and Search it with Correlation ID

for more detail Information how to find this new trouble shooting in sharepoit 2010

there is a post from Dina Ayoub  Program Manager on SharePoint, MSFT

http://sharepoint.microsoft.com/Blogs/GetThePoint/Lists/Posts/Post.aspx?ID=353

Wednesday, July 20, 2011

How to clear a InfoPath Form with a click

when i design a fillable form with InfoPath 2010. the user ask me if i can add a button. that they can clear a form

you can setup a rule to handle clearing all the fields or set those fields with empty value.

 first you can select the button that will handle the clear all fields event.


















click on the New Dropdown List control to select  Action from the dropdown list.






















then you can select Set a Field's Value from Add DropDown List which Beside Run These Actions:

click on the button beside the text box under Field Label















select the fields that you need to clear






















leave this Value Empth.

you can repeat the above steps serveral times for multiple fields actions.


after you can complete the run setting, the button will be able to clear all the fields that the rule had been set.

How to Automatically Generate a FileName of InfoPaht Form in InfoPath 2010

when you design a form or report in InfoPaht 2010. then you publish it the Form Library.

it runs good since you can submit it to the Form Library via Data Connection File.

However you can perform the second test, it always popup an error windows complaining that the file Name

already exists in the library.

you can fix this issue by modifying the Data Connections



then click on Fx button to Open the Expression Edit Windows


Type this file Name concat("MyCustomForm","_",now()) in Expression Editor












click on to close the Expression Editor and click through the next button to update the Data

Connections.

finally click on the publish Button to update the form in the Sharepoint site.

then you can test the form without out  Same File Name Existing Error.

Monday, July 18, 2011

How to configure Service Acount to run Stored Procedure that run SSIS Package without sysAdmin


You only need to follow these step then you can execute a SSIS Package from Stored procedure.

Enable xp_cmdshell option in the DB (assume until you and your system Admin comfortable with this)

        EXEC sp_configure 'xp_cmdshell', 1
       
RECONFIGURE

 Grant Access Permission To Service Account.
  GRANT exec ON xp_cmdshell TO [MyDomain\ServiceAccount]

 Create create a proxy credential for a Windows account
  
EXEC sp_xp_cmdshell_proxy_account ' [MyDomain\ServiceAccount]', 'MyPassword';
GO


 Create Credential

create credential ##xp_cmdshell_proxy_account## with identity = 'MyDomain\ServiceAccount', secret = 'password' 


you might get this error when you call the stored procedure.

"error An error occurred during the execution of xp_cmdshell. A call to 'LogonUserW' failed with error code: '1385'.

you can fix this error by following this link  http://grumpydba.blogspot.com/2010/07/xpcmdshell-raises-error-call-to.html