In Office 365/ SharePoint Online I came across and issue where I would share a site with an external user, but the invitation would not appear in the "Access requests and invitations" of the site setting. This did not prevent the invitation from being sent or the users accessing the site, but it made it difficult to track the invitations.
As it turns out, this is a know problem, but the cause was unknown. If you have this problem, then Microsoft has a script they can run to fix the issue. You will need to contact them to run the script in their hosted environment.
After going through a number of scenarios, I determined the root of this issue. If you create a site template from a site you created, you can create new sites from that template and the invitations work properly. If you create a new template from a site that was created from a template, the Access request and Invitations will not display your invitations. You will need to call Microsoft for a fix.
To avoid the problem, always make your changes on your original clean site and make new templates from your model template.
Cheers,
Carlos
Showing posts with label o365. Show all posts
Showing posts with label o365. Show all posts
Wednesday, August 13, 2014
Wednesday, August 6, 2014
SharePoint 2013 Enterprise Search Go Back - Revisited
This is a rehash of my previous post on the same subject, but it's been redone to use images.
So you want to leverage SharePoint Enterprise Search because it has all the bells and whistles you are looking for in your results and search features. You set your site to leverage enterprise search and you let people start using it. The problem that comes up is that when a user begins using the search, they are taken to the Enterprise Search site collection and there is no quick way to get back from where they started. The only way, out the box, is to hit the back button until they are back to where they started.
I found this to be less than ideal, so I cobbled together some JavaScript that leverages a browser session cookie to capture the site they launch the search. When the user is ready to go back, they simply click on the back button to return to where they started.
Here is the javascript:
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("returnGoBackURL");
function returnGoBackURL() {
//*******************Specify your url search site here (with https and ending forward slash)*********
var rootURL = 'https://xxxxx.sharepoint.com/sites/searchFAST/';
var lastURL = document.referrer;
if (lastURL.substr(0,rootURL.length) != rootURL) {
setCookie('lastURL', document.referrer, 1 );
document.getElementById('returnURL').href = document.referrer;
} else {
document.getElementById('returnURL').href = getCookie('lastURL');
}
}
function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value + ";path=/";
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
</script>
<a href="https://xxxxx.sharepoint.com"><img border="0" src="/sites/searchFAST/SiteCollectionImages/home2.png" alt="home"></a>
<a id='returnURL' class='returnURL' href='http://xxxxx.sharepoint.com'><img border="0" src="/sites/searchFAST/SiteCollectionImages/back.gif" alt="back"></a>
Here are the a couple of starter images for Home and Back. Just update the image references in the script to point to the location of these files after you have put them on your site.
Add the script to a file and put it in the site collection documents. You will need to add a content editor web part (CEWP) to each of the search result pages and point it to the file you saved with the above script. I put the CEWP under Search Navigation.
In O365, the search site has a document library called 'Pages'. In here are a number of result pages used to display the search results. The default is 'results', but you will find others for 'peopleresults', 'videoresults' and some others. You will want add the content editor webpart to all the result pages where you want the back button to appear.
Cheers,
Carlos
I found this to be less than ideal, so I cobbled together some JavaScript that leverages a browser session cookie to capture the site they launch the search. When the user is ready to go back, they simply click on the back button to return to where they started.
Here is the javascript:
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("returnGoBackURL");
function returnGoBackURL() {
//*******************Specify your url search site here (with https and ending forward slash)*********
var rootURL = 'https://xxxxx.sharepoint.com/sites/searchFAST/';
var lastURL = document.referrer;
if (lastURL.substr(0,rootURL.length) != rootURL) {
setCookie('lastURL', document.referrer, 1 );
document.getElementById('returnURL').href = document.referrer;
} else {
document.getElementById('returnURL').href = getCookie('lastURL');
}
}
function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value + ";path=/";
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
</script>
<a href="https://xxxxx.sharepoint.com"><img border="0" src="/sites/searchFAST/SiteCollectionImages/home2.png" alt="home"></a>
<a id='returnURL' class='returnURL' href='http://xxxxx.sharepoint.com'><img border="0" src="/sites/searchFAST/SiteCollectionImages/back.gif" alt="back"></a>
Here are the a couple of starter images for Home and Back. Just update the image references in the script to point to the location of these files after you have put them on your site.
Add the script to a file and put it in the site collection documents. You will need to add a content editor web part (CEWP) to each of the search result pages and point it to the file you saved with the above script. I put the CEWP under Search Navigation.
In O365, the search site has a document library called 'Pages'. In here are a number of result pages used to display the search results. The default is 'results', but you will find others for 'peopleresults', 'videoresults' and some others. You will want add the content editor webpart to all the result pages where you want the back button to appear.
Cheers,
Carlos
Labels:
back button,
cookies,
o365,
search,
SharePoint 2013
Wednesday, June 18, 2014
Workflow Fails to Publish - Copy Workflow Actions Issue
This is a post is actually regarding using the copy and paste function in SharePoint 2013. If you are pressed for time, you can just walk away with this recommendation: Don't use the copy and paste function! The copy function simply doesn't work well.
I had a workflow that, no matter what I changed, when I published it, it looked like it published successfully, but it actually didn't. I came across this link that mentioned copying an email can cause problems. The problem stems from SharePoint designer trying to copy the variables in the email. It just can't handle it.
The beauty of copying an action is to avoid having to paste in all the workflow variables in a highly formatted email. If it can't handle the variables, then this is pretty much useless. I ended up deleting the emails I copied and re-creating each one by scratch and then it worked fine ( I didn't want to lose all the other work I had already put into the workflow by starting over).
I suspect the problem would occur with any action involving variables you try and copy, so just stay away from the copy function. The link above mentioned that this is only an issue with tasks, but it's not worth figuring when it does or doesn't work.
Cheers,
Carlos
Friday, January 11, 2013
SharePoint Go Back Button on Search
What's up with SharePoint Search? It has some nice bells and whistles, but when you do a search, how do you go back if you don't find what you want -or- just want to get back to where you started? Sure you have the back button on the browser, but for some reason that just seems so unfulfilling. Everyone else is using the history.go(-1) but the problem with that is that it fails if the user does more than one search. Who is with me on this?!
Well, until someone slaps me in the face with a better idea, I came up with this simple solution. To create a link back to where you started, you need capture where they are coming from and hang on to that information until the user is ready to go back from where they came from. I can't remember why using server/app variable couldn't or wouldn't work (probably because we are on SharePoint Online) so I decided to try cookies.
Here is what it will look like:
This requires the browser's cookies to be enabled. Most people do and so do we, within our company, so it works fine for us. Also, it works regardless of the site collection the search is being launched.
1. Start by editing the result page for your searches by clicking on Page - Edit.These default pages are /yoursearch/pages/results.aspx and /yoursearch/pages/peopleresults.aspx.
2. Edit the fourth line in the script below to reflect your search site.
3. Copy the script to a text file. Save the file and upload it to your search site.
4. Add a CEWP - Content Editor Web Part where you would like the button/link to appear. Point the web part to where ever you put this file within your search site.
(BTW- I tried the history.go(-1) option and it doesn't handle the scenario of the user doing multiple queries before wanting to go back.)
Let me know if you like it or if it makes you want to toss your cookies. I don't have much design sense, so if you have a better idea of how to put it on the page, please let me know. I am probably forgetting something you need to get this to work so post a message with any questions.
Cheers!
Carlos
Well, until someone slaps me in the face with a better idea, I came up with this simple solution. To create a link back to where you started, you need capture where they are coming from and hang on to that information until the user is ready to go back from where they came from. I can't remember why using server/app variable couldn't or wouldn't work (probably because we are on SharePoint Online) so I decided to try cookies.
Here is what it will look like:
This requires the browser's cookies to be enabled. Most people do and so do we, within our company, so it works fine for us. Also, it works regardless of the site collection the search is being launched.
1. Start by editing the result page for your searches by clicking on Page - Edit.These default pages are /yoursearch/pages/results.aspx and /yoursearch/pages/peopleresults.aspx.
2. Edit the fourth line in the script below to reflect your search site.
3. Copy the script to a text file. Save the file and upload it to your search site.
4. Add a CEWP - Content Editor Web Part where you would like the button/link to appear. Point the web part to where ever you put this file within your search site.
(BTW- I tried the history.go(-1) option and it doesn't handle the scenario of the user doing multiple queries before wanting to go back.)
Let me know if you like it or if it makes you want to toss your cookies. I don't have much design sense, so if you have a better idea of how to put it on the page, please let me know. I am probably forgetting something you need to get this to work so post a message with any questions.
Cheers!
Carlos
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("returnGoBackURL");
function returnGoBackURL() {
//*******************Specify your url search site here*********
var rootURL = 'https://mydomain.com/searchURL/';
var lastURL = document.referrer;
if (lastURL.substr(0,rootURL.length) != rootURL) {
setCookie('lastURL', document.referrer, 1 );
document.getElementById('returnURL').href = document.referrer;
} else {
document.getElementById('returnURL').href = getCookie('lastURL');
}
}
function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value + ";path=/";
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
</script>
<center>
<a id='returnURL' class='returnURL' href="#">Go Back</a>
</center>
<style type="text/css">
.returnURL {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #dcdcdc;
display:inline-block;
color:#777777;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:6px 40px;
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
}.returnURL:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}.returnURL:active {
position:relative;
top:1px;
}
</style>
Labels:
2010,
back button,
cookies,
go back,
live,
o365,
search,
sharepoint online,
web part
Wednesday, September 12, 2012
SharePoint 2010 Stock Quote
So you want to add a stock quote to your SharePoint site? Something that will work on SharePoint 2010 or SharePoint Online. Want something painless to implement? I searched high and low and I finally found this gem. I can't remember where I got the idea of using rest calls, but when I remember I'll put your credit on here. In any event, it bears repeating the steps here and I'm also adding a little XSLT formatting for my contribution.
The hardest part of this whole process is the XSL, but I'm giving it to you below so all you have to do is cut and paste.
Here is what it will look like:
Here is what it will look like:
Symbol | Last | Change | % |
GOOG | 691.75 | +1.31 | .19 |
Here is an overview of the steps:
1. Create a "REST Service Connection" "Data Source" in SharePoint Designer.
2. Open the page you want to add your new stock quote in SharePoint Designer.
3. Insert a Data View using the new Data Source you created.
4. Open your page from the web and 'Edit Web Part' on your new Data View Web Part.
5. Modify the XSL to format the data. (Simply cut and paste code below.)
6. Save.
That's it! So let's get started.
1. Create a "REST Service Connection" "Data Source" in SharePoint Designer.
Oooh REST Service Connection....very scary. Right? Wrong! I've read blogs and blogs on REST and I still can't make heads or tails of it. The more I read, the less RESTful I get. I digress. There are a number available API's out there, but finding the right one took a little hunting. Here is the URL for retrieving a stock quote on Google from Google:
http://www.google/ig/api?stock=goog
To create the REST Service Connection, open SharePoint Designer to you site, select Data Sources, and then click on the Rest Service Connection. A Data Source Properties window will come up.
1. a. Enter the URL string.
1. b. Tab out of the field (the stock parameters will appear in the list below)
1. c. Click OK.
You will then see the "api on www.google.com" in the "RSS, REST, Server Scripts" section of the Data Sources.
See the image below:
2. Open the page you want to add your new stock quote in SharePoint Designer.
3. Insert a Data View using the new Data Source you created.
This is what it looks like:
Pretty ugly huh? Not very useful either....Ok, let's clean it up...Save your work and close out SharePoint Designer.
4. a. Open your page from the web and 'Edit Web Part' on your new Data View Web Part.
4.b. Open the XSL Editor
5. Modify the XSL to format the data.
This is last step. You will need to change the XSL in the template section named "dvt_1.rowview". Since this is and even worse text editor since notepad, you'll want to drag and expand the window as large as it will go. (Sorry, no max window icon on this screen).
Replace all the code within this tag
<xsl:template name="dvt_1.rowview">
and BEFORE the close tag
</xsl:template> (you'll find it right before <xsl:template name="dvt_1.empty">)
Here is the code to replace that section:
<tr> <td> <table border="0" cellspacing="0" width="100%"> <tr> <td width="25%" class="ms-vb">Symbol</td> <td width="25%" class="ms-vb">Last</td> <td width="25%" class="ms-vb">Change</td> <td width="25%" class="ms-vb">%</td> </tr> <tr> <td width="25%" class="ms-vb"> <b><xsl:value-of select="finance/symbol/@data"/></b> </td> <td width="25%" class="ms-vb"> <xsl:value-of select="finance/last/@data"/> </td> <td width="25%" class="ms-vb"> <xsl:choose> <xsl:when test="finance/change/@data < 0"> <font color="#CC0000"><xsl:value-of select="finance/change/@data"/></font> </xsl:when> <xsl:otherwise> <font color="#009900"><xsl:value-of select="finance/change/@data"/></font> </xsl:otherwise> </xsl:choose> </td> <td width="25%" class="ms-vb"> <xsl:choose> <xsl:when test="finance/change/@data < 0"> <font color="#CC0000"><xsl:value-of select="finance/perc_change/@data"/></font> </xsl:when> <xsl:otherwise> <font color="#009900"><xsl:value-of select="finance/perc_change/@data"/></font> </xsl:otherwise> </xsl:choose> </td> </tr> <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"> <tr> <td colspan="99" class="ms-vb"> <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span> </td> </tr> </xsl:if> </table> </td> </tr>
6. Save your work!
That's it.
Did it work for you? Have any twist or other cool implementations? Share!
Cheers,
Carlos
Cheers,
Carlos
Labels:
2010,
api,
free,
live,
o365,
rest,
sharepoint online,
stock quote,
web part,
xslt formatting
Subscribe to:
Posts (Atom)