Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Wednesday, February 5, 2014

Set up permission level to run JQUERY from webpart

If you plan to use webpart with Jquery u have to use Contribute permissions. If less privileged permissions are used, no information will be displayed.

I discovered that there is no need for whole Contribute permissions level. There is one permission responsible for this - Update Personal Web Parts - Update Web Parts to display personalized information. 

So we can create new permission level (make a copy of Read level) and add this permission.

Monday, December 3, 2012

An internal database error occurred in the Business Data Connectivity Shared service (BDC)

Firstly i want to say that i run across on this error not quite (as i thought) relating to BDC.. but:

My initial goal was simple - create some custom list in SP2010 with Lookup (information already on this site) fields. When i tried to do that i got following message:

So.. BDC service is related with creating Lookup type fields in SharePoint. Time ago we moved our SharePoint databases to new SQL server, but we didn't move our BDC db.. so i started to realize where is the problem. I have to create new BDC service application with new db in our new sql server + delete old BDC application (relationships), point my web application to new BDC service application.

I looked in SP Central Adminstration page for Service Applications (Application management -> Manage Service Applications).

1. Deleted old BDC application.
2. Created new BDC.
3. Point web application to new BDC (Application management -> Service Applications -> Service Application Associations)

But unfortuneatlly when i tried to create Lookup field i got new error saying:
Entity (External Content Type) cannot be found with Namespace = '', Name = 'New external content Type'


Previously i had some (With old BDC application) External Lists with custom external content types in them, so when we are creating Lookup fields, SharePoitn is looking for those content types and they didn't exist any more, so i DELETED THOSE OLD EXTERNAL LISTS.

Friday, October 12, 2012

This item is no longer available. It may have been deleted by another user

There are many articles about this SharePoint error message: "This item is no longer available. It may have been deleted by another user"

Mike Smith's Tech Training Notes and

These solutions didn't work for me!

Thursday, August 23, 2012

How to get all SharePoint Users with web services in c#

SPservice.UserGroup usergroup = new SPservice.UserGroup();
usergroup.Credentials = System.Net.CredentialCache.DefaultCredentials;

XmlNode allusers = usergroup.GetAllUserCollectionFromWeb();

foreach (XmlNode child in allusers.ChildNodes) {
                            foreach (XmlNode item in child) {
                                  foreach (XmlAttribute atr in item.Attributes) {
                                              if (atr.Name.ToString() == "LoginName") {

SPservice - name of web reference in your visual studio project with URL:
http://<your server name>/_vti_bin/usergroup.asmx

Monday, July 25, 2011

Sharepoint 2010 Server install Step By Step

In my previous post Sharepoint 2010 Foundation Install Step By Step we went through the steps to install SharePoint 2010 Foundation, so this time we will go through SharePoint Server 2010 installation process.

there is practically no difference between SPF 2010 & SPS2010 installation, except of some new error messages :)

So here we go

Tuesday, May 17, 2011

Sharepoint Query with SPAPI

1. To use SPAPI query download it from HERE!!!.
2. On SharePoint server under "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS" create folder "SPAPI".
3. Place extracted js files from download to this folder.
4. Put your query within these code lines: 

<script type="text/javascript" src="/_layouts/SPAPI/SPAPI_Core.js"></script>
<script type="text/javascript" src="/_layouts/SPAPI/SPAPI_Lists.js"></script>
<script type="text/javascript">

<your spapi query>


//SPAPI query example:

Monday, April 11, 2011

SharePoint Workflow does not start automatically (kb947284)

I was able to start my workflow automatically which I created through SharePoint Designer. 

Firstly I checked out instructions from this article kb947284. In my case regarding to kb947284 I was logged in with "System Account". So I took some other user from sharepoint member group and logged back in, but with no luck...

After hours of endless searching i came across to something like this: "If I browse my sharepoint web page with IP address instead of hostname automatic workflows wouldn't start!!!"

Friday, April 1, 2011

Sharepoint 2010 Foundation install Step By Step

My goal was to install Sharepoint Foundation 2010 (SPF2010) so that web application is on one server and the database is on seperate server.

So these were my steps:

Thursday, March 24, 2011

Get current SharePoint User with JavaScript

During the SharePoint form customization in many cases it is important to know the current user. So with JavaScript and SharePoint Designer this is how it's done:

var loginElement = document.getElementById("zz7_Menu").innerHTML;
var end = loginElement.indexOf("<");
var nameOnly = loginElement.substring(8, end);

note: I use this script in MOSS2007, but if you use this in WSS3 change "zz7_Menu" to "zz6_Menu".

My whole point using this script was to get the current username (in my case organization username format is: username14, username57 etc.) And based on that I need to get only numbers from this username. So there is my complete solution:

var loginElement = document.getElementById("zz7_Menu").innerHTML;
var end = loginElement.indexOf("<");
var nameOnly = loginElement.substring(8, end);
var number = nameOnly.replace (/[^\d]/g, "");
var k;

if (number != "") {
var elements = document.getElementsByTagName('select');
for (var i = 0; i < elements.length; i++) {
if (elements[i].title == 'YOUR DROPDOWN TITLE'){
var sel = elements[i].options.selectedIndex = number;
for (k=elements[i].options.length-1;k>=0;k--) {
if (k != sel) {