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.

Filter by
Sorted by
Tagged with
0
votes
1answer
72 views

copy or move replace file and update version sharepoint CSOM

hi im using method for copy or move file on sharepoint. but i want to ask how to implement when it's duplicated it automatically replace and update version? i've been try with this function but it's ...
0
votes
1answer
30 views

How to Hide SharePoint Library Column (after file upload) Based on Conditions, JS JQuery, Multi-Choice Column

I am trying to use js to hide SharePoint Document Library columns based on conditions. Using SP 2010. I was able to hide drop-down columns based on an initial dro-down column value thanks to a former ...
0
votes
2answers
34 views

Trouble conditionally hiding fields in SharePoint 2013 custom list

I have a custom list in SP 2013 where I need to conditionally show/hide fields in the list based on responses to other fields in the list. I'm so close to figuring it out, but it's not been easy. I've ...
2
votes
1answer
269 views

How to use - SPUtility.GetSPField to set date

The script does not work. I have to write the date value in the field (I tried to do both a regular text field and a Date field) Date2 As it seems to me because of the wrong name. But maybe something ...
0
votes
1answer
66 views

Sputility.js on SharePoint 2019 - Unable to submit an item on a list

I have a custom .aspx file built by a different person (long time ago) on SharePoint 2013 where I have jquery-1.11.3.min.js and sputility.js loaded. It is used to hide and show some fields, and then ...
0
votes
0answers
27 views

Calling List View Web Part via CEWP

I am implementing a site page with CEWP, using SPUtility.js. This page is created for users to select documents in a site as a batch, and then submit a deletion request which triggers a workflow ...
1
vote
1answer
244 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(); ...
2
votes
2answers
557 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
238 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
1answer
137 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
116 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
984 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
1k 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
177 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
182 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
699 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
228 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
55 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
770 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
165 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
129 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
162 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
167 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
812 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
2k 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
1k 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
4k 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 ...
4
votes
1answer
5k 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
384 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
2k 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 ...
2
votes
2answers
3k 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
886 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
70 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
2k 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
1k 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
562 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
2k 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
171 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
268 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
848 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
125 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
725 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
1k 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
10k 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 ...