Email alerts in SP 2013 Online
We have bought Sharepoint Online 2013 for a group of users within the organisation. The licences are assigned to the users in this way - "[email protected]". As such whenever certain rights are to be assigned to the user we select
the user name from address book.
The question is
In what way the respective user will be notified over email about rights being assigned to him. These rights could be allocation of projects, allocation of tasks and others. In normal course the user the has his email id as "[email protected]";
which does not match with the one mentioned above.
Is there a better way to handle this or synchronize ?
Office 365 tracks users based on their login, which is their USER PRINCIPAL NAME. The UPN does not necessarily match their EMAIL address (especially since an account may have multiple incoming email addresses).
Permissions are given using their LOGIN, while communication is performed using their EMAIL address.
Make sure that the accounts' email addresses are correct, and you should be fine.
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs
Similar Messages
-
Desktop email alert with outlook 2013 in windows 7 no skype
I recently Upgraded from office 2010 to office 2013 running on windows 7 Enterprise in my office Laptop, I do not have Skype installed in my laptop and I don't receive any email alert notification or either sound. I am using outlook 2013 with Exchange
account, what should I do ?
Regards,
PraveenHi,
Do you mean there is no Skype App after installing Office 2013?
Did you custom install Office 2013 without checking Skype app?
Thanks
Mavis
Mavis Huang
TechNet Community Support -
Why has BC stopped sending us email alerts regarding workflow or online form submissions?
It appears our site has stopped alerting us via email regarding online form submissions...what's going on with this? www.smilegalaxykids.com
BrentIt appears the "orders" box is checked as it should be....and I know we haven changed anything recently on our end. (see screen shot attached)
-
Dynamic CRM 2013 Online how to execute Report, generate PDF and email
Dear All,
I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
quote form.
I am using the attached code, but facing various issues.
1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var Xrm;
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
function getReportingSession() {
var reportName = "Quotation_Report"; //set this to the report you are trying to download
var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var recordid = Xrm.Page.data.entity.getId();
// recordid = recordid.substring(1, 37); //getting rid of curly brackets
alert(recordid);
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
function createEntity(ent, entName, upd) {
var jsonEntity = JSON.stringify(ent);
var createEntityReq = new XMLHttpRequest();
var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
createEntityReq.setRequestHeader("Accept", "application/json");
createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
createEntityReq.send(jsonEntity);
var newEntity = JSON.parse(createEntityReq.responseText).d;
alert("new entity" + newEntity);
return newEntity;
function createAttachment() {
var params = getReportingSession();
var recordid = Xrm.Page.data.entity.getId();
alert("recordid " + recordid);
var orgName = Xrm.Page.context.getOrgUniqueName();
var userID = Xrm.Page.context.getUserId();
//create email record
// Prepare the SOAP message.
var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
"<soap:Header>" +
"</soap:Header>" +
"<soap:Body>" +
"<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
"<entity xsi:type='email'>" +
"<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
"<subject>" + "Email with Attachment4" + "</subject>" +
"</entity>" +
"</Create>" +
"</soap:Body>" +
"</soap:Envelope>";
// Prepare the xmlHttpObject and send the request.
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);
xHReq.send(xml);
// Capture the result
var resultXml = xHReq.responseXML;
// alert("resultXml " + resultXml);
// Check for errors.
var errorCount = resultXml.selectNodes('//error').length;
if (errorCount != 0) {
alert("ERROR");
var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
alert(msg);
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
//var emailid = userID;
var post = Object();
post.Body = encodePdf(params);
var email = new Array();
email[0] =new Object();
email[0].id = emailid;
email[0].entityType ='email';
post.Subject ="File Attachment";
post.AttachmentNumber = 1;
post.FileName ="Report.pdf";
post.MimeType ="application/pdf";
post.ObjectId = Object();
post.ObjectId.LogicalName ="email";
post.ObjectId.Id = email[0].id;
post.ObjectTypeCode ="email";
alert(post.ObjectId.Id);
createEntity(post,"ActivityMimeAttachment", "");
alert("created successfully");
email.Subject = "Your Order";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: customerId, // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerId, // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
</SCRIPT>
<SCRIPT type=text/vbscript>
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</SCRIPT>
</head>
<body>
<input type="button" onclick="createAttachment();" value="Attach Report" />
</body>
</html>
Thanks. and waiting for your valuable comments.
- MittalHello,
Yes, I was able to make my code working as below. Tested on CRM online 2013.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
if (typeof (SDK) == "undefined")
{ SDK = { __namespace: true }; }
SDK.JScriptRESTDataOperations = {
_context: function () {
if (typeof GetGlobalContext != "undefined")
{ return GetGlobalContext(); }
else {
if (typeof Xrm != "undefined") {
return Xrm.Page.context;
else { return new Error("Context is not available."); }
_getServerUrl: function () {
var serverUrl = this._context().getServerUrl()
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
return serverUrl;
_ODataPath: function () {
return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
_errorHandler: function (req) {
return new Error("Error : " +
req.status + ": " +
req.statusText + ": " +
JSON.parse(req.responseText).error.message.value);
_dateReviver: function (key, value) {
var a;
if (typeof value === 'string') {
a = /Date\(([-+]?\d+)\)/.exec(value);
if (a) {
return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
return value;
Create: function (object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 201) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Retrieve: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
Update: function (id, object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "MERGE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Delete: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "DELETE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
if (filter != null) {
filter = "?" + filter;
else { filter = ""; }
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set" + filter, true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
__namespace: true
</script>
<script type="text/javascript">
//Create Email and link it with Order as Regarding field
var Xrm;
var email = new Object();
var ownerID = "";
var CustomerId = "";
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
//Get ownerid who send email of quotation to customer
function GetOwnerID() {
var owner = Xrm.Page.getAttribute("ownerid").getValue();
ownerID = owner[0].id;
var ownerName = owner[0].name;
var entityType = owner[0].entityType;
GetToEmailGUID();
//Get customerid who receive email of quotation from owner
function GetToEmailGUID() {
var Customer = Xrm.Page.getAttribute('customerid').getValue();
CustomerId = Customer[0].id;
var CustomerName = Customer[0].name;
var entityType = Customer[0].entityType;
//if CustomerId is type of "Account" then get Primary Contact id of that account
if (entityType == "account") {
var contact = Xrm.Page.getAttribute("customerid").getValue();
if (contact === null) return;
var serverUrl = Xrm.Page.context.getClientUrl();
var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
var req = new XMLHttpRequest();
req.open("GET", oDataSelect, false);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
req.onreadystatechange = function () {
if (req.readyState === 4) {
if (req.status === 200) {
var retrieved = JSON.parse(req.responseText).d;
CustomerId = retrieved.PrimaryContactId.Id;
else {
alert(this.statusText);
req.send();
function CreateEmail() {
GetOwnerID();
email.Subject = "Email with Report Attachment";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
GetReportId('Quotation');
//Create attachment for the created email
function CreateEmailAttachment() {
//get reporting session and use the params to convert a report in PDF
var params = getReportingSession();
//Email attachment parameters
var activitymimeattachment = Object();
activitymimeattachment.ObjectId = Object();
activitymimeattachment.ObjectId.LogicalName = "email";
activitymimeattachment.ObjectId.Id = email.ActivityId;
activitymimeattachment.ObjectTypeCode = "email",
activitymimeattachment.Subject = "File Attachment";
activitymimeattachment.Body = encodePdf(params);
activitymimeattachment.FileName = "Report.pdf";
activitymimeattachment.MimeType = "application/pdf";
//Attachment call
SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
//ActivityMimeAttachment CallBack function
function ActivityMimeAttachmentCallBack(result) {
var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
var width = "800px";
var height = "600px";
window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
// To open window which works in outlook and IE both
//openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
//This method will get the reportId based on a report name that will be used in getReportingSession() function
function GetReportId(reportName) {
var oDataSetName = "ReportSet";
var columns = "ReportId";
var filter = "Name eq '" + reportName + "'";
retrieveMultiple(oDataSetName, columns, filter, onSuccess);
function retrieveMultiple(odataSetName, select, filter, successCallback) {
var serverUrl = Xrm.Page.context.getServerUrl();
var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
if (select) {
odataUri += "$select=" + select + "&";
if (filter) {
odataUri += "$filter=" + filter;
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataUri,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
success: function (data) {
if (successCallback) {
if (data && data.d && data.d.results) {
successCallback(data.d.results);
else if (data && data.d) {
successCallback(data.d);
else {
successCallback(data);
error: function (XmlHttpRequest, errorThrown) {
if (XmlHttpRequest && XmlHttpRequest.responseText) {
alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
function onSuccess(data) {
reportId = data[0].ReportId.replace('{', ").replace('}', ");
CreateEmailAttachment(); // Create Email Attachment
//Gets the report contents
function getReportingSession() {
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
var Id = Xrm.Page.data.entity.getId();
var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
quotationGUID = quotationGUID.replace('}', "");
var reportName = "Quotation"; //set this to the report you are trying to download
var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var rptPathString = ""; //set this to the CRMF_Filtered parameter
var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
//remove the part starting from &p:salesorderid if your report has no parameters
retrieveEntityReq.send(rptPathString);
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
"&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
"&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
</script>
<script type="text/vbscript">
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</script>
</head>
<body>
<input type="button" onclick="CreateEmail();" value="Attach Report" />
</body>
</html>
Thank you,
Mittal. -
Alerts and Reminders in Project 2013 Online?
Hi all,
Can Alerts and Reminders be set in Project 2013 online? Or is it only available for 'On Premise' environments.
Thank you,
SJPage can be accessed using the URL trick given by Pankaj above.
https://servername.sharepoint.com/sites/pwa/_layouts/15/pwa/notification/self_notification.aspx
But
setting it here does nothing. No email alerts. Can someone confirm if this is working or as Gary stated it is not available at all by any means.
Abhijeet, MCTS | [email protected] -
CRM 2013 Online - sending email with CRM Online and jQuery
Hi,
I have a html page in webresource in a CRM 2013 Online form. There is a button to send an e-mail from the html page. Because this is an embedded html, I will not be able to create a plug-in to trigger 'send an e-mail'. The best bet
is to send an e-mail via javascript.
I found an article about 'Sending email with SharePoint and jQuery',
http://geekswithblogs.net/ThorvaldBoe/archive/2014/07/03/sending-email-with-sharepoint-and-jquery.aspx
Is there a similar Jquery way we can send e-mail from CRM 2013 Online? Thanks.Hello,
Actually you can send email through plugin using Actions feature. Recheck my articles about the feature -
http://a33ik.blogspot.com/search/label/Action
In case you anyway want to send your email directly you should recheck following articles:
http://mileyja.blogspot.com/2012/02/create-email-activity-in-microsoft.html
http://mileyja.blogspot.com/2012/02/send-email-synchronously-in-microsoft.html
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog -
Team Foundation Server 2013 Email Alerts not working.
Hello
I'm trying to configure Email alerts for my TFS but whenever I do a "Send test email" I get the following error.
This is what the log file in the error says.
[Info @05:07:35.833] ====================================================================
[Info @05:07:35.833] Team Foundation Server Administration Log
[Info @05:07:35.833] Version : 12.0.30324.0
[Info @05:07:35.833] DateTime : 01/27/2015 10:07:35
[Info @05:07:35.833] Type : Configuration
[Info @05:07:35.833] Activity : Settings
[Info @05:07:35.833] Area : ApplicationTier
[Info @05:07:35.833] User : WIN-NOBGFM4GTAF\Administrator
[Info @05:07:35.833] Machine : WIN-NOBGFM4GTAF
[Info @05:07:35.833] System : Microsoft Windows NT 6.1.7601 Service Pack 1 (AMD64)
[Info @05:07:35.833] ====================================================================
[Error @05:09:20.580]
Exception Message: The operation has timed out (type WebException)Exception Stack Trace: at System.Net.HttpWebRequest.GetResponse()
at Microsoft.TeamFoundation.Admin.Console.Models.DlgSendTestMailViewModel.SendEmail()
I've tried searching around and have found one or two other people with the same problem but haven't found a working answer.
Nauman Abbas ICS Network EngineerTFS forum is here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsgeneral
This posting is provided AS IS with no warranties or guarantees , and confers no rights.
Ahmed MALEK
My Website Link
My Linkedin Profile
My MVP Profile -
Unable to save lookup field data in SharePoint 2013 online list
Dear Support,
I had successfully created provider hosted app and deployed on SharePoint 2013 online site, in my project I created orderservice.asmx.cs web service and write a code for save record on SharePoint
2013 online list as I mentioned below and calling on App1.js file.
But I am unable to save lookup field value as mentioned below code
Customer is a lookup field I want to save data in SharePoint 2013 online list( Order)where I had successfully
inserted text field data (Title &
Special_x0020_Instruction).
i am getting error as mentioned below
500 Internal Server Error {"Message":"Invalid web service call, missing value for parameter: \u0027Title1\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2
parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData,
IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
Please let me know the code how to insert lookup field value (Customer)
in SharePoint online list.
OrderService.asmx.cs
Public
int InsertOrder (Order
orderRecord)
pwd.MakeReadOnly();
clientContext.Credentials =
new
SharePointOnlineCredentials (myUserName, pwd);
try
Web
oWeb = clientContext.Web;
ListCollection lists = oWeb.Lists;
List oOrderlist = clientContext.Web.Lists.GetByTitle("Order");
clientContext.Load<ListCollection>(lists);
clientContext.Load<List>(oOrderlist);
ListItemCreationInformation
itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oOrderlist.AddItem(itemCreateInfo);
oListItem["Title"]
= Title; listItem["Special_x0020_Instruction"]
= orderRecord.Instruction;
listItem ["Customer"]
= orderRecord.CustomerId;
listItem.Update();
clientContext.ExecuteQuery();
return 1;
catch
return -1;
App1.JS
$("#Save").click(function
debugger;
var OrderProfile = $('#orderprofile').val();
var CustomerId = $('#exCustomerlist').jqxComboBox('getItem',
$('#exCustomerlist').val());
//var Instruction = $('#instruction').val();
alert(OrderProfile);
alert(CustomerId);
var obj = {
'Title': OrderProfile,
'Customer': CustomerId }
$.ajax({
url:
"OrderService.asmx/InsertOrder",
type:
"POST",
dataType:
"json",
data: JSON.stringify(obj),
contentType:
"application/json; charset=utf-8",
beforeSend:
function (XMLHttpRequest) {
//Specifying this header ensures that the results will be returned as JSON.
XMLHttpRequest.setRequestHeader("Accept",
"application/json");
success:
function (response) {
$(".errMsg ul").remove();
var myObject = response.d;
alert(myObject);
error:
function (response) {
alert(response.status +
' ' + response.statusText +
' ' + response.responseText);
Regards,
AkhileshHi Alex Brassington,
Thanks for your reply.
I am having the Site Administrator Permission of the public site.
I am having the permission of Company Administrator of that site but still unable to find
Device Channel on Site Setting. still I gave the user full control from Site Permission but nothing is happening.
What should I do next? -
Standard intranet requirement template for SharePoint 2013 online Site
Hi, we are doing requirement gathering of one big markets operator company and planning to build one SharePoint
site using SharePoint 2013 online technology.
Now, we are looking for one standard document to showcase standard features should be in that portal based
upon based on customer need, industry trends and practices for standard intranet build.
Any similar template document will be helpful. Thanks!Hi Shailendra,
Could you please tell me the detailed customer need ? As different customer need will have different industry trends and practices.
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Anonymous User forms in Sharepoint 2013 Online (Office 365)
I'm using Sharepoint 2013 online with Office 365.
Is there any way for an anonymous user to communicate with the site using forms (preferably Infopath)?
There are many, many versions of this question on the web, but most answers seem to talk about features I just don't have in Office 365 Sharepoint - such as Application Management in Central Administration, which just isn't there.
The only feature I can find is the Excel Survey in Form Templates. This is at least a start, but what I really want is the ability for an anonymous user (a customer) to submit information into a Custom List using a form; or, second best, in an email (WITHOUT
having to have Infopath Filler installed). this is all do-able for a fully-subscribed user of the intranet site, but I can't afford to buy individual subscriptions for all my customers. Nor do I want them seeing each other's data, or accessing my intranet!
I have spent so long researching this and getting nowhere, and really need to know if it's just a straight 'no, it's impossible', or keep trying.
Thanks
JonathanHi Jonathan,
According to your description, my understanding is that you want to enable anonymous user with forms in SharePoint 2013 Online.
There is a Sandbox solution from CodePlex, it manages anonymous access on Office 365 / SharePoint 2013. Please have a try.
https://anonymous365.codeplex.com/
In addition, I am not an expert for SharePoint 2013 Online, I suggest you create a new thread on SharePoint Online forum, more experts will assist you with SharePoint Online.
SharePoint Online forum:
http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Anonymous User forms in Sharepoint 2013 Online
I'm using Sharepoint 2013 online with Office 365.
Is there any way for an anonymous user to communicate with the site using forms (preferably Infopath)?
There are many, many versions of this question on the web. Several lead to
http://claytoncobb.wordpress.com/2011/06/03/infopath-allowing-anonymous-users-to-submit-forms-in-sharepoint-2010/, but this is about Sharepoint 2010, not 2013. Other answers talk about features that are not in Sharepoint online 2013, such as Application
Management in Central Administration. There is also a Sandbox solution from CodePlex that gets touted,
https://anonymous365.codeplex.com/, but this fails in Sharepoint Online 2013.
The only feature I can find is the Excel Survey in Form Templates. This is at least a start, but what I really want is the ability for an anonymous user (a customer) to submit information into a Custom List using a form; or, second best, in an email (WITHOUT
having to have Infopath Filler installed). Seems a pretty basic need, really - letting your customers place orders. This is all do-able for a fully-subscribed user of the intranet site, but I can't afford to buy individual subscriptions for all my customers.
Nor do I want them seeing each other's data, or accessing my intranet!
I have spent so long researching this and getting nowhere, and really need to know if it's just a straight 'no, it's impossible', or keep trying.
Thanks
JonathanThanks pramod7
Yes, I am using the public site. But unless I'm missing something, Custom Lists (and associated forms) cannot be exposed to anonymous users. They are just not in the permissions list.
I can create a page in the public site and add a Form Templates web part. The options I then get for creating a new form in the Form Templates library are Word Document, Excel Workbook, Powerpoint Presentation, One Note Notebook or Excel Survey. An
InfoPath form is not an option. None of these (as far as I can see) allow for any data entered in the 'form' by a user to be stored in a Custom List for further processing. Most require the user to have Word/Excel/whatever on their machine, rather than
just use the browser. The nearest you get is the Excel Survey, which at least regularises the data entered by an anonymous user into columns in a spreadsheet, but this is not sophisticated enough for, say, an online ordering system in which you would not want
customers seeing each other's orders. -
Custom Site MailBox for Office 365 SharePoint 2013 online
Is it possible to create programmatically create site mailbox for Office 365 SharePoint 2013 online?
How to customize site mailbox email address like [email protected]Hi,
In SharePoint 2013 Online, if you want to sync document library with local drive, you can use OneDrive to achieve it.
http://office.microsoft.com/en-001/support/sync-onedrive-for-business-or-sharepoint-site-libraries-to-your-computer-HA102832401.aspx
Best Regards
Dennis Guo
TechNet Community Support -
Add Issue ID to an email alert?
Dear all,
(running WSS 3.0)
I'm desperately trying to add the Issue ID to the alert email that is sent when a list item is assigned to you. I have looked around and followed many tutorials online, however none of my changes have had any effect. So far I have done:
Copied alerttemplates.xml to customalerttemplates.xml
Edited customalerttemplates.xml
Removed "ID" from <ImmediateNotificationExcludedFields>
Ran stsadm -o updatealerttemplates -url http://server -filename "C:\Program files\common files\Microsoft shared\web server extensions\12\template\XML\customalerttemplates.xml"
Ran iisrest
Restarted Sharepoint Timer service
However even after doing that the email sent when an item is assigned is just the basic default! I've just tried to add the ID to the most simple section of the email (footer) however nothing seems to change the email alert.
I've followed guides such as:
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/c458eb9c-e9a7-4957-98d8-596962c1e2c2
http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx
http://www.sharepointusergroup.org/NewYork/Meeting%20Present ations/Bryan%20-%20SharePoint%20Alerts%202008aug6.pdf
http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/16ff437d-c72b-42e8-bc95-59065aee175d
Can anyone please help?
Regards,
SteveI am aware that this is very old thread, and I needed similar solution to display ID in the email alerts.
I am using SharePoint 2010 Enterprise. And I am able to get it displayed correctly in the alerts. Output attached:
Here are the changes I did:
1. Created a copy of alerttemplates.xml and named it as alerttemplatesWithIssueID.xml.
2. Open it in browser to check the structure. And then removed "ID" from <Properties><ImmediateNotificationExcludedFields> and <DigestNotificationExcludedFields> for SPAlertTemplateType.GenericList and SPAlertTemplateType.AssignedToNotification
<AlertTemplate> types.
Note: <AlertTemplate Type="List" Name="SPAlertTemplateType.AssignedToNotification"> has just one property <Properties><ImmediateNotificationExcludedFields></Properties> as DigestNotification is not applicable for this event
type.
3. register it using stsadm -o updatealerttemplates command.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>stsadm -o updatealerttemplates -url http://<sitecollectionUrl> -filename "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\alerttemplatesWithIssueID.xml"
-lcid 1033
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>iisreset
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>
4. My next todo action item is to display it on top instead of displaying ID at the bottom of the alert.
Thanks & Regards, Atul Shukla -
Workflow in Project server 2013 online not going particular stage after Approval
Hi All,
i have created workflow using sharepoint designer 2013 for project server 2013 online. and i have also set the approver after the first stage. when i create a project using this workflow, project is created successfully and the approval task also go for
a approval to specific user. and i have set the property that after approval it has to go on specific stage. but the problem is when user approve the task it shows approved but my stage in workflow is remain same. it is not going to any stage.
i don't know why this type of problem is occur.
FYI, i have created same workflow for Project server 2013 on premise(Which is installed in my server) and
it is working fine but when i want to deploy this workflow in
project server 2013 online its giving error.
so please help me to solve this type of issue.
ThanksI am also experiencing issues with this. After the approval task is completed, the Workflow gets cancelled with the following message
RequestorId: 60d96368-4cb4-b059-8086-604972a92e60. Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
bookmarkManager, Location resultLocation)
All other desired workflow actions work as expected. Emails are sent, project is moved from stage to stage, however as soon as the workflow approval task is completed, either Approved or Rejected, the Internal Status is changed to Canceled and the
workflow fails.
What is interesting is when the Approval task is completed, the approver will receive an email notification that the task was CANCELLED or DELETED....
not COMPLETED, which is what would be expected.
Has anyone seen this - any potential resolution? -
Speed up SharePoint 2013 Online Workflows
Hi all,
Is there anyway to speed up a SharePoint Designer Workflow in SharePoint 2013 Online. I am restricted to using SP Designer. If I were on-premises I would throw an app or workflow server at it, but I am online. It is taking 7 seconds for a very simple workflow.
Thanks,
Kelly
Personal Blog: http://thebitsthatbyte.comHi Kelly,
Please understand that workflow executes per related timer job. With SharePoint on premise edition, we could go to CA > Monitoring > Timer Job, and modify timer job configuration.
Since the issue you encountered is based on SharePoint online edition, there is no access for client to configure, I’d recommend you contact online support engineer for more assistance. Thanks for the understanding and for your convenience:
http://community.office365.com/en-us/f/154.aspx
http://social.technet.microsoft.com/Forums/msonline/en-US/home?forum=onlineservicessharepoint
Similar issue:
http://sharepoint.stackexchange.com/questions/72318/workflow-speed-in-sharepoint-online-office-365-e3
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support
Maybe you are looking for
-
Iphone OS 3.1 and iTunes 9 issue
I updated my itunes the other day and it seems to be working fine, but I updated my iPhone 3g to OS 3.1 yesterday, after I downloaded the file from itunes, I got a message letting me know "my phone is getting ready for update" after this message, itu
-
Overflow Message in ALV Output
Hi All, In my program I am fetching sub total based on currency. Report output is in ALV Grid format. But, there are few cases in which I am facing problem. I am getting: "The field Expected order value cannot be totalled because of field overflow" m
-
Generate report to the screen and file (pdf) at the same time
Hello guys, I am trying to distribute a report at the same time to the screen and the file. I cannot get it to work. In the help file it says that I could specify destinations in the 'Distribution Dialog'. When I enter there two destinations the repo
-
Fuzzy text in terminal on rMacBook Pro
Not sure if this is a bug. Looks like the text in the terminal app lost has lost its crispness on the retina macbook pro. It's no longer retina resolution. Does Apple take bug submissions on this forum?
-
I can't Back up my files PLEASE HELP
Hello all, Please help me with this, I back my Q10 files up and did software update for the last update and then I tried to restore the file and keep showing this message.. "The BlackBerry ID associated with this back up file doesn't match the blackb