Tuesday, December 16, 2014

SharePoint designer 2010: “the business data connectivity metadata store is currently unavailable”

This was driving me crazy the other day… I tried everything, reconfiguring the services, installing updates I didn't need, uninstalling SharePoint Designer and installing it again, 32 bit, 64 bit, what ever you want.

Every time i opened SharePoint designer and tried to add an external content type, I got this error:

image

 

Then I realized I was doing 2 things that might be the issue:

1. I was running 64 bit of SharePoint designer

2. I was running on my SharePoint Server itself, in a dev machine on CloudShare

So, I went ahead and installed SharePoint designer 32 bit on my client machine – and what do you know, it was working.

Now, the question is what was the problem – running on the server, or running the 64 bit version?

So, I uninstalled the 64 bit version and installed the 32 bit version just out of curiosity…

And what do you know? Same error message… It appears that this is not working when running on the server itself.

It might be specific to my configuration – but if you run into this error, try installing the designer on a different client machine.

Good luck!

Friday, November 21, 2014

Cannot start user profile synchronization service

I searched a lot on this issue online… for some reason it was set to the wrong user, I don’t know why or how, and I couldn’t stat this service.

Going to start the service – I could not change the account name, which was grayed out, and didn’t have the password for it – so I couldn’t start the service.

A LOT of internet searches and I didn’t find one post saying why the account id is grayed out, or how to change it.

So, I finally figured it out.

You have to go to central administration, select security on the left navigation and go to “configure service accounts”.

Here, you can select from a drop down any service you want (in my case, the user profile sync) and (finally!) here you can change it to use any other account, and add this account to the managed accounts in the farm.

Simple task, but very hard to find.

Not so intuitive, if you ask me.

Here is how this form looks like:

image

Tuesday, November 11, 2014

Get the zodiac sign for a date in JavaScript

Just like the title says,

I was building a new layout for our data view plus web part that shows upcoming birthdays from a SharePoint list.

I wanted to show the zodiac sign for each person, using HTML codes you can render the signs but the hard part was to figure out the correct sign for each date.

Here is the end result:

image

You can get this layout and the javascript free from our web site (should be posted soon), but here is what I did in a nutshell (stay with me, its not short):

1. I created an object that has all the start dates for each sign, with the HTML sign for it and its name (for tooltip):

var zodiacSigns = {
    120: {html: "&#9809",text: 'Capricorn'},
    218: {html: "&#9810",text: 'Aquarius'},
    320: {html: "&#9811",text: 'Pisces'},
    420: {html: "&#9800",text: 'Aries'},
    521: {html: "&#9801",text: 'Taurus'},
    621: {html: "&#9802",text: 'Gemini'},
    722: {html: "&#9803",text: 'Cancer'},
    823: {html: "&#9804",text: 'Leo'},
    923: {html: "&#9805",text: 'Virgo'},
    1023: {html: "&#9806",text: 'Libra'},
    1122: {html: "&#9807",text: 'Scorpius'},
    1222: {html: "&#9808",text: 'Sagittarius'},
    1231: {html: "&#9809",text: 'Capricorn'}
};

2. Now, for each date I have I build a number from the month+day, next I loop through all elements of zodiacSigns until I get a value greater than the current date – which means the one before was the correct sign. Then I build the html span with that info:



var zodiacValue = parseInt(monthStr + dayStr, 10);
var currentZodiacSign = null;
for (var z in zodiacSigns) {
    try {
        if (currentZodiacSign == null) currentZodiacSign = zodiacSigns[z];
        if (zodiacValue > parseInt(z,10))
            currentZodiacSign = zodiacSigns[z];
        else break;//passed the date - the last one was the right sign. stop looping.
    }
    catch (e) {
    }
}
 
var zodiacPart = "";
if (currentZodiacSign != null)
    zodiacPart = "<span class='ZodiacSign' title='" + currentZodiacSign.text + "'>" + currentZodiacSign.html + "</span>";

A lot of work, but I like the result.