I can't insert access application


When i try to insert access aplication to my sharepoint 2013 site – it start to add but in the middle i get error “Sorry, there was a problem when adding the app. Click to try again” and it doesn’t work
why?
thanks in advanced
Limor

Try to add to Calender List


Hi I am trying to add my data to the calender list but I cant make it work.

I have a button onButtonClick is this event. I have following Code

var context = SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists();
function createItem() {
var targetList = list.getByTitle('AppbokningarList');
var listItemTitle = document.getElementById('Textrubrik').value;
var listItemCustom = document.getElementById('datepicker').value;
var listItemFromTime = document.getElementById('timepicker').value;
var listItemtoDate = document.getElementById('datepickerto').value;
var listItemToTime = document.getElementById('timepickerTo').value;
var listItemBeskrivning = document.getElementById('Textbeskrivning').value;
var result = listItemCustom + "T" + listItemFromTime +":00" + "Z";
var result2 = listItemtoDate + "T" + listItemToTime + ":00" + "Z";

============== On this code i am fynding my controls from my default.aspx page i also setting so the datetime displays 2014-11-19T13:00:00Z

Then i have a SP.Query that will check for double booking on the result and result 2

var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><Query><Where><And><Eq><FieldRef Name='EventDate' /><Value IncludeTimeValue='TRUE' Type='DateTime'>' + result +
    '</Value></Eq><Eq><FieldRef Name='EndDate' /><Value IncludeTimeValue='TRUE' Type='DateTime'>' + result2 +
    '</Value></Eq></And></Where></Query></View>');
this.collListItem = targetList.getItems(camlQuery);
context.load(collListItem);
context.executeQueryAsync(

Inside my Context.Execute i have following code there i check if the queries value are the same as in the result and result2 if it is, then say to user that the date are booked if now create an new item.

 function() {
        var itemCount = collListItem.get_count();
        if (itemCount > 0) {

            alert(itemCount);   

        } else {

            alert('go ahead and create the event the user wants');
            var listItemCreateInfo = new SP.ListItemCreationInformation();
            var newItem = targetList.addItem(listItemCreateInfo);
            newItem.set_item('Title', listItemTitle);
            newItem.set_item('EventDate', result);
            newItem.set_item('EndDate', result2);
            newItem.set_item('Description', listItemBeskrivning);
            newItem.update();
            context.load(newItem);
        }
    },
    function(sender, args) {
        alert(args.get_message());
    }
);

}

Here my Code gets the values on this code,

newItem.set_item('Title', listItemTitle);
            newItem.set_item('EventDate', result);
            newItem.set_item('EndDate', result2);
            newItem.set_item('Description', listItemBeskrivning);

The problem is that the list dont update and that i dont get any Error.

Can i edit the default calendar list code for hiding weekend


Can i edit the default calendar list code for hiding weekend.

I want to edit list i am having the visual studio ,designer.

Please help me

sharepoint notify new items to list


I’m creating a sharepoint hosted app, two pages, default.aspx and admin.aspx. When I update the list in the appweb thru a function in default.aspx, I want that a notify windows will popup to the client that are watching the admin.aspx page, that a new items is added to the list.

Is that possible in sharepoint 2013?

Cannot update allowMembersEditMembership


I can’t seem to update the setting on a group to allow members to edit members. This is my code:

function setGroupsMembershipEditingMode(uri) {
  var context = new SP.ClientContext(appweburl);
  var appContextSite = new SP.AppContextSite(context, uri);
  var oWebsite = appContextSite.get_web();

  var groups = oWebsite.get_siteGroups();
  var ownersGroup = groups.getByName('Owners');
  ownersGroup.set_allowMembersEditMembership(true);

  context.load(ownersGroup);
  context.executeQueryAsync(Function.createDelegate(this, onSucceeded), Function.createDelegate(this, onFailed));

  function onSucceeded() {
    alert("AllowMembersEditMembership = " + ownersGroup.get_allowMembersEditMembership());
    //actually returns true but the setting is not changed!!!

    alert("Done");
  }

  function onFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + 'n' + args.get_stackTrace());
  }
}

Could anyone help me with what do I need to put in the context.load to get it to work? Thanks?

How to create lookup field programmatically using AddFieldAsXml Method?


i have two lists(Invoice & Client) which i had created dynamically through code and i want to create lookup field programmatically for relationship between this two list.
In Invoice List i have following columns:
1.ID
2.InvoiceNo
3.ClientId – this column i need to create as lookup
4.ClientId:ClientName – this column is used to get ClientName from Client List when i enter ID in ClientId Column
5.etc

In Client List i have following columns:
1.ID
2.ClientName
3.Address
4.etc

So far i’m able to create lookfield that is ClientId in invoice list 3rd column but how can i create programmatically 4th column has additional column.

When we create lookup column using sharepoint administration there is an option called
“Add a column to show each of these additional fields” this i want to create programmatically

My Code

 List refList= webobj.Lists.GetByTitle(Constants.Client);
 clientContext.Load(refList);
 clientContext.ExecuteQuery();
 Field LookUpField = listObj.Fields.AddFieldAsXml(
 "<Field Type='Lookup' DisplayName='ClientId' Required='FALSE' List='" + refList.Id + "' 
 ShowField='ID' StaticName='ClientId' 
 Name='ClientId' />", true,AddFieldOptions.DefaultValue);
 LookUpField.Update();
 clientContext.ExecuteQuery();

Thanks

Getting error – The e-mail message cannot be sent. Make sure the e-mail has a valid recipient


I am having an Office 365 provider hosted app. I am using Azure Active Directory. In this app I am trying to send an email to user but I am getting following error:
“The e-mail message cannot be sent. Make sure the e-mail has a valid recipient.”

I have tried following things:

  1. Email can be sent to user manually.
  2. I am able to resolve users in Office 365 Site collection.

Thanks in advance.

SharePoint Hosted App Cross Domain Calls to a REST API


I have a SharePoint hosted app and I want to use the JIRA REST API with it. Which means I want to make requests and work with the data from the responses. Because it’s a SharePoint hosted app I can only use client side code.

So far I used the web proxy to achive that, but that means I have to add the remote endpoint to the AppManifest.xml. But I want the user of my app to enter the URL to their JIRA Site, so I don’t know the URL from the start. Because it’s not possible to add remote endpoints dynamically I can’t use the web proxy I suppose.

Now my question is, is there a way to make requests to a REST API without the web proxy?

Sharepoint 2013 Apps Configuration on Premises


While configuring our SharePoint environment for APPS we Created a Generic/Blank Web Application as I was getting 404 error until I created the blank web app on port 80

But after that i am getting the below alert in health analyzer

“A default zone url is pointing to the machine name of a web front
end. Since this installation has more than one web front end, this
can result in a variety of errors including incorrect links and failed
operations.”

Also from time to time we are having strange issues in our SharePoint like the web sites open fine in IE 11 but in Chrome we will get 401 Unauthorized and according to this technet blog “https://social.technet.microsoft.com/Forums/sharepoint/en-US/dbd7563e-52e7-4456-9102-74c9e4766646/can-not-access-sharepoint-2013-site-i-am-getting-401-unauthorized?forum=sharepointadmin” they suggest to keep the “IP address is in the Alternate Access Mapping collection for your site”

Can you suggest if that’s valid approach and the errors we are having are related with AAM configuration ?

HTTPS SharePoint site with HTTPS Provider hosted app – The remote certificate is invalid according to the validation procedure


We have SharePoint 2013 site configured with SSL and we have developed a provider hosted app which interacts with SharePoint list.

If we try accessing the Provider hosted app from the SharePoint site with HTTP there are no any errors thrown.

But whenever the Provider hosted app is tried accessing from the HTTPS SharePoint site(using https address) we are getting below error:

The remote certificate is invalid according to the validation procedure.

Stack trace:
[AuthenticationException: The remote certificate is invalid according to the validation procedure.]
System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +2983172
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +86
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +262
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +473
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +8530566
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +230
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +645
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +9
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +87
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1467
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +84
System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +22
System.Net.ConnectStream.WriteHeaders(Boolean async) +761

[WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.]
System.Net.HttpWebRequest.GetResponse() +8534156
Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() +58
Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) +975
ProviderHostedHTTPSWeb.Default.Page_Load(Object sender, EventArgs e) +348
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

We have already added the certificate used for the SharePoint site and the provider hosted app in the SharePoint central admin trusts.

Any idea’s how can I resolve this issue?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam