Monday, February 28, 2011

How do you put multiple batch file commands in a single line?

dir & dir

should be working.

where "DIR" is one command

Active Directory users are not shown in People Picker of the permissions + SharePoint

problem might be , the application pool's identity is unable to access AD users. So change the application pool's identity to domain user (basically service A/c).

goto Security--> Configure Service Accounts-->select the application pool of the specific web application, then select the service a/c.

(Im using SF 2010)

It worked for me. It saved my day.

Tuesday, February 22, 2011

sharepoint foundation + delete item + Cannot complete this action.

I have created some lists & related lists using object model. Im changing my column names also at the time of creating the field with SPRelationshipDeleteBehavior.

when I try to delete the item in parent list, istead of showing the message "This item cannot be deleted because ....." , it threw error like "Cannot complete this action...", when I check log , no luck. (found one related to lock, not sure what it is).

Then after long trial and error methods, I changed my code to two parts.
1. Create lists and related lists
2. for the specific fields set deleterelationshipBehaviour

from then its working. I guess the field name might cause the error, as index is created using old name.

add additional fields in sharepoint list 2010, using object model

http://msdn.microsoft.com/en-us/library/ff623048.aspx

here is the logic

string strFirstNameCol = relatedList.Fields.AddDependentLookup("First Name", primaryCol.Id);
SPFieldLookup firstNameCol = (SPFieldLookup)relatedList.Fields.GetFieldByInternalName(strFirstNameCol);


where, "primaryCol" is the main look up field in the second list.

Thursday, February 17, 2011

The language-neutral solution package was not found

Sometimes u get this error while deploying ur package, then u can try the following commands in sharepoint 2010 powershell

//find the deployed solutinos
get-spsolution

//then replace mysol with ur solution
(get-spsolution mysol.wsp).Delete()

then try to deploy ur sol. again

--happy coding

SharePoint Custom fields

1. Thanks to jeremyluerken for writing such a wonderful article (custom picker in SP 2010)

http://sharepointsolutions.com/sharepoint-help/blog/2009/10/create-a-custom-picker-in-sharepoint-2010/


2. Thanks to Waldek Mastykarz for his marvelous work, i've been lookin for this kind of solution for a long time, finally found this.
(Custom picker, fill multiple fileds at a time)

http://blog.mastykarz.nl/filling-forms-entitypicker-callback/