Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sputility]

Provides tools for converting date and time formats, for obtaining information from user names, for modifying access to sites, and for various other tasks in managing deployments of Microsoft SharePoint Foundation.

1
vote
1answer
14 views

SPUtility.GetSPField MakeReadOnly Not working on Required Person Field

On my edit form I have a required name field that I want to make readonly. Here is what I have in javascript file: $(document).ready(function(){ SPUtility.GetSPField("Name").MakeReadOnly(); ...
0
votes
0answers
52 views

SharePoint C# SendMail Not Sending Out Mail

Previously, my SPUtility.SendMail function is working. But recently no email was being sent out. Base on several articles, I tried setting HttpContext.Current to null before invoking SendMail and ...
0
votes
0answers
195 views

Mailbox unavailable. The server response was: 5.7.1 Unable to relay for

We have configured SMTP server on our Dev Env. Have done the required settings in CA. Below is the code to prepare email subject, body and other parameters and to send email LstEmailer emailData = ...
2
votes
2answers
199 views

Get Current User using SPUtility

I want to check if current user = "xxx" and make the field "yyy" as Read Only. $(document).ready(function () { var userName = $().SPServices.SPGetCurrentUser(); if(userName == "xxx") { ...
1
vote
0answers
143 views

SharePoint + “/_api/SP.Utilities.Utility.SendEmail” + not working for specific account

Ours is a SharePoint 2016 On Prem env. We have developed a custom component which uses "/_api/SP.Utilities.Utility.SendEmail" to send email. Email is getting sent. Except for a specific account. ...
0
votes
0answers
32 views

Send email to different domain of AD users

I have a function who sends email like: function sendEmailProveedor(emailSpan, fromMail, body, subject) { var appweburl = _spPageContextInfo.webAbsoluteUrl; var urlTemplate = appweburl + "/_api/...
0
votes
1answer
47 views

Is it possible to sent an email with inline image using sputility?

Does anyone knows of a way to embed an image to a powershell code sending email using SPUTILITY? The image can be located on a shared location for that purpose (aka http://example.com/image.jpg) ...
1
vote
1answer
44 views

How can I get a nuget package for `SPUtility` compatible with `Microsoft.SharePoint2013.CSOM`?

In CSOM, you could use SPUtility to get the members of a security group. see https://stackoverflow.com/questions/4314767/getting-members-of-an-ad-domain-group-using-sharepoint-api/6164703 I use the ...
0
votes
4answers
271 views

Unable to change my Date filed using javascript inside my Edit form

I am working on a sharepoint 2013 on-premises team site. now i want to set a column which is of type date/time to be equal to today date,so i added a script inside the Edit form, then i tried to set ...
1
vote
2answers
612 views

How i can set a value for a SPUtility.MakeReadOnly(); Choice field

I am working on a SharePoint On-Premises 2013 farm. and inside my Create & Edit form, i want to set a Status Choice field as read-only, then later on to chnage its value inside a JavaScript script....
0
votes
1answer
137 views

Can I use the field title in a newform as a tooltip?

I have a NewForm to add an new item to a list. I like to have a meaningfull tooltip for eacht of the fields on that form. I know it can only be done by changing the title of the fields. How do I ...
0
votes
1answer
133 views

Show/Hide Script Issues

I am using this script Hide/Show field on list form based on value from another field and I can get it to work for one item but I have three to hide based on a choice field and it is not working. I ...
5
votes
1answer
528 views

SPUtility not working

I am trying to get SPutility to work in Sharepoint online. I could not get any scripts to work in neither script editor nor content editor web parts. I don't have access to custom forms advanced mode ...
1
vote
0answers
154 views

The SPUtility method MakeReadOnly() will show empty field instead of disabling a Person or Group field, when i am assigning it to a Group

I have a field named Assigned To inside my Create and Edit list forms. And i am using SPUtility library link to disable and enable certain fields. now the Assigned To field can be assigned to a Person ...
0
votes
0answers
48 views

Sharepoint 2013 - javascript to show hide not responding

I have been using this show/hide SPUtility code for some time without problem. IN my new custom form I have tried unsuccessfully for the code to 'activate'. I am able to see the code within the ...
4
votes
1answer
517 views

Does SPUtility.js support adding and removing choices from a drop-down field

I am working on a sharepoint server 2013. and inside my built-in create.aspx list form i added the following javascript code:- var selectobject = document.getElementById("Approver_90afaad9-2b54-46fb-...
0
votes
1answer
122 views

SP SPUtility GetSPField not cosistant

I have a piece of code using SPUtility on the same page. I try both version on the same line: version A result: Unable to get a SPField named FieldA ... $(document).ready(function () { var SPFA =...
0
votes
1answer
92 views

SPUtility MakeReadOnly for Person fields not including relative url in the read only links

I'm using sputility.js for making some fields as readonly in my new/edit forms. It works like a charm for all fields except Person fields. The issue with Person fields is when person fields became ...
0
votes
0answers
137 views

SPutility Script Not working in Edit Form

I have a SPutility script that I have running on my Edit Form that makes the designated form fields "Read Only". I noticed yesterday that it is not working on my real site, but is working on my test ...
-1
votes
1answer
134 views

Using SPUtility script with If Statement

I am currently using a PreSaveAction script to check a field to make sure it is filled out before saving the form. However, while testing different situations, I realized that if "Reviewer 1" rejects ...
0
votes
1answer
586 views

SPUtility MakeReadOnly not working on Person fields in edit form

I'm customizing one of my edit forms with sputility.js to make some of my fields as readonly. The readonly statement looks like this SPUtility.GetSPFieldByInternalName('Title').MakeReadOnly(); It ...
4
votes
2answers
1k views

SharePoint Online SPUtility GetValue empty for People Picker

I am trying to retreive the value of a people picker using SPUtility v0.14.2 in SharePoint Online though it always returns an empty string. My script is as follows, do I need to retrieve the value ...
1
vote
1answer
908 views

Unable to get SPField named 'FieldName'

I keep getting an error every time I am trying to insert some jquery/sputility code to get a SharePoint form field to be hidden if certain conditions are met. The error is "Unable to get SPField named ...
2
votes
1answer
3k views

SPUtility Show Hide Field Based on Value from another field Custom Form

I followed the steps in the link HERE to Show/Hide a field in a form, based on the value of another field. What I am having an issue with now is getting this to work on a New List Form, that I ...
3
votes
1answer
3k views

Unable to send email through SPutility.sendemail

unable to send a mail through system.net api and sputility.sendmeail() . I tried the below code for sending mail through the above. but it failed to send mail. But if I tried with PowerShell ...
1
vote
0answers
326 views

SPUtility.ParseDate - format of the input date string

In the SPUtility.ParseDate function, the 2nd parameter is the date in string format. Is there any specific format required for this? Will it work with any format? The MSDN documentation for this API ...
3
votes
2answers
1k views

Get Value from Person or Group Type Field

How can I get Value from Person or Group Type Field from a List form. Context here is a SharePoint list. the point is I need to do this for validation purpose. So I need the value entered in this ...
1
vote
2answers
2k views

SPUtility not working on Custom edit Form

I have created new Custom Edit Form for one of my List and trying to set Value using SPUtility.js. I am constantly getting error Unable to get a SPField named Title(Field Name) But same piece of ...
2
votes
1answer
578 views

SPUtility not working correctly

I just started using this tool, so I tested SetValue in order to familiarize myself with it. It seemed to only work whenever I hit the "Ok" button to the Content Editor web part of the new/edit form. ...
0
votes
1answer
59 views

Redirect in UserControl

I have an issue to redirect page on the page load of my user control For this i use string sRedirectionURL = "/mylist/forms/allitems.aspx"; SPUtility.Redirect(sRedirectionURL + Request.Url.Query, ...
7
votes
2answers
2k views

Fail to send email by utility class

I have utility class to send email. currently i am facing error :- a recipient must be specified EmailProperties emailp = new EmailProperties(); emailp.To = new string[] { "robbstark@gmail....
0
votes
1answer
1k views

Sharepoint: inline image in email

I am unable to add inline images in an email. The mail just show a square having a red cross inside it. Is there a way to add inline images to email which needs to be sent from SharePoint. Updated: ...
1
vote
1answer
987 views

SPUtility.SendEmail returns false for external users (different domain)

I have used SPUtility.SendEmail to send email to users programmatically and it works. However if the user's email is different than the outgoing email domain it returns false. How do I make it work ...
0
votes
1answer
2k views

Validate Choice Field with multiselection Checkboxes on PreSaveAction function Call

My SharePoint 2010 list has a choice column that with checkboxes and allows multiple selections. For all these checkbox field choices there is a corresponding textbox fields are created. This textbox ...
0
votes
1answer
509 views

Validation of multiple textbox, number fields using JavaScript

I am doing the JavaScript validation of SP 2010 list mynewcustomform.aspx page using the code written in content editor web part. Fields are: textbox1, textbox2, textbox3. var valoftxt1 = SPUtility....
0
votes
1answer
1k views

How to set a value in a Choice Field based on the text box change SP 2010 in list newform.aspx

I am having few fields like single line of text, choice field, rich text on my customnewform.aspx of my SP 2010 SPList. Now if I enter a value say USA on the text box, I need to set the dropdown/...
0
votes
1answer
153 views

Getting Content Type while adding a New Item

I have a list that is using several Content Types, and have the requirement that the Title be generated based on the content of other fields. I've used sputility.js to achieve most of this just fine, ...
3
votes
1answer
220 views

Run Inline ASP code on a Published Master Page

I'd like to use the SPUtility.MakeBrowserCacheSafeLayoutsUrl method in my published master page (used in a publishing site) in order to force SharePoint to stop caching my JavaScript and CSS files. ...
0
votes
1answer
647 views

Why is SPHttpUtility.HtmlEncode preferred to HttpUtility.HtmlEncode?

The SharePoint Code Analysis Framework rule SPC020220: Do not call 'HttpUtility.HtmlEncode' states that: The assembly should not call HttpUtility.HtmlEncode(string) to encode strings [and that] ...
1
vote
1answer
2k views

SharePoint 2013 redirect on save or cancel jquery

I've been battling to get this work for the last day or so and its driving me up the wall. Firstly I'm using the 'SPUtility' jQuery scripts which are great to showing or hiding fields depending on ...
0
votes
1answer
97 views

How to get GetLocalizedstring for announcement list

I am trying to add xsltlistviewwebpart and it has to be from announcement list. How to write this line? string str = "$Resources:??";//How to get announcement list reference here? public static ...
0
votes
1answer
674 views

SPUtility.SendEmail doesn't exist

I'm trying to send an email with sharepoint's SPUtility.SendEmail() method, but according to Visual studio it doesn't exist. I have using Microsoft.Sharepoint and .Utilities included, but still ...
0
votes
2answers
977 views

SPUtility.SendEmail() always returns false

I have one application which will create task form for each level based on the prior level approval. While creating each tasks I have to send the email to the users who all are involved in the task. ...
5
votes
2answers
8k views

How to send email with attachments in SharePoint 2013?

I am using SharePoint 2013 to implement a custom workflow application. During one of the state transitions, I want to send an email to people who are part of a certain group with a zip file of ...
10
votes
1answer
6k views

SPUtility.SendEmail() with attachment (.ics files)

We send the email from SharePoint by using SPUtility.SendEmail() method. But, now I need to attach multiple .ics file (Outlook meeting requests) with this email. I have only one option, I have to ...
3
votes
1answer
1k views

SPUtility.SendEmail returns false when invoked in asmx

I have a function inside an asmx page which needs to send an email, but SPUtility.SendEmail returns false. SPContext.Current is null, so I create an SPSite object with the site url, and from that, I ...
1
vote
1answer
2k views

SPUtility.SendEmail works but will not send links

In SP 2010, I'm using SPUtility.SendEmail and it is working fine except for sending links. In the body string argument, I input "<a href=\"http://www.google.com\">Click me</a>" It ...
0
votes
1answer
1k views

The name 'SPUtility' does not exist in the current context

I am using the following code in my page layout file but I am getting error. CODE <%= SPUtility.GetLocalizedString("$Resources:NewsHeading", "myresourcefile", Thread.CurrentThread....
2
votes
2answers
3k views

Sending richText format in email (currently using SPUtility.sendemail)

I have a list field that contains hyperlinks and richtextformat. To send the email I am using: Spweb web = spcontext.current.web; StringDictionary headers = new StringDictionary(); ...
2
votes
1answer
2k views

SPUtility.GetPrincipalsInGroup not working with every AD Group

I'm currently having an issue with SPUtility.GetPrincipalsInGroup, I've search here and on Google but I haven't found any explication for this behavior. I use the method to list Users that are part or ...