Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all 25064 articles
Browse latest View live

difference between updating site column and content type field at content type hub ?

$
0
0

Hi,

I want to update hidden property of Field [Site Clumn] which is currently hidden. I wan to un-hide that field. And for your information this field column settings in content type is "Optional".

So I want to know the difference between Site column field and refereed Content type field??

Thanks/ Siddheshwar Kohale

 


Custom Display Template

$
0
0

I have a late-breaking requirement for a customer, and I am somewhat weak on my HTML, and I am struggling. I have an OOB Display Template, and all I want to do is limit the characters on one of the lines.  The Managed Property I am using is the BodyOWSMTXT from Announcements.

I have successfully been able to strip the HTML from the Body in the modified Display Template, but every method I apply to try to limit the characters displayed in the CSWP has not worked.  I know there is a simple way to limit characters, and I have referred mainly to this:

http://www.benprins.net/2014/06/04/display-template-show-limits-characters/

but I am at my wit's end.  The template throws an error.  I am going to do some debugging, but I am just hoping there is something I am missing or if someone has experience in this.

Thank you


DWM

C# or JavaScript for SharePoint Customization

$
0
0

Customization options in SharePoint 2013 and Office 365 are different. In OnPremise, visual web parts and other concepts can be implemented in C# code and in Office 365, customization in apps can be done in JavaScript. So, which is the preferred approach going forward and are there any guidelines to choose which one to opt for.

SharePoint 2013 Create Folders does not work, Launch in dialog ignored

$
0
0

We recently upgraded from 2010 to 2013 on Windows 2012 STD.

After migrating a site, and upgrading the create new folders no longer works when you click new folder from the ribbon or from list toolbar.

Create new folders no longer works when you click new folder from the ribbon or from list toolbar.

  1. Click save nothing happens just flashes with no errors.
  2. This is happening in any browser Chrome, Firefox, IE 9, 10 , 11
  3. Open with Explorer works fine, SPD works fine.
  4. Drag and Drop works fine as long as use only files not folders which is by MS design.
  5. Used PowerShell to recreate Upload.aspx no change.
  6. Created new library same problems.
  7. Created new site non upgraded site pure 2013 same problem exists

Also Modal launch in dialog is ignored whether on or off.

  1. I have run PowerShell cmds to set the modal on or off and its still ignored.
  2. Verified permissions Full Control, Site Collection admin, doesn't matter.
  3. Checked ULS log no errors.
  4. Do not see in javascript errors in the browsers.

Hellllppppp no answers found yet after week of searching.

I am seeing Expected ')' init.js  in IE Debugger

SCRIPT1006: Expected ')'
init.js (1,123894)

Also just tried Content and Structure feature  to create new folder it fails as well with no error


powershell script string variable line break (or) new line not woring in email body

$
0
0

Hi,

Can any one suggest on below.

I included for new line(or) line break as"`n" , as below mentioned powershell.But in the email sent out using the below script, all my string variable content  is showing up as single line with out any line break as "Dear,Please find below Thanks and Regards."

[string]$bodyText=""
$bodyText = "Dear ,"
$bodyText+="`n"
$bodyText+="Please find below"
$bodyText+="`n"
$bodyText+="Thanks and Regards."

$headers = New-Object System.Collections.Specialized.StringDictionary

        $headers.Add("to", "Test@domain.com")
        $headers.Add("from", "Test@domain.com")
        $headers.Add("subject", "Details - new line not working.")
        $headers.Add("content-type", "text/html")
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web, $headers, $bodyText)


apsx page with code blocks in /SitePages/ directory question

$
0
0

Hi I have an inline c# web page in the SitePages in the root site of a sharepoint install to get the code to run i added


      <PageParserPaths>
<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
       </PageParserPaths>


to the web.config in the root of the sp tree what i would prefer is to narrow it down to

/SitePages/DataDictionary/Default.aspx being the only page that can run

or

/SitePages/DataDictionary/  being the only directory that can run asp.net code

when i change /* to /SitePages/DataDictionary/   or /SitePages/DataDictionary/default.aspx it goes back to saying codeblocks not allowedin asp.net pages any ideas on how I can do this?

Set DateTimeField webcontrol with date

$
0
0

We have several lists in a site collection. I am trying to populate some fields of one sharepoint list by opening its new form. There is one field which is a datetimefield and I am populating it on selectedindexchanged of a drop down. First time, it populates fine. But, if user selects another dropdownvalue this date do not get clear, neither it gets populate with different value. Please can someone tell me what should be the way to do it.

Here is my OnLoad code:

System.Web.UI.WebControls.TextBox startDatetb = null;

startDatetb = (TextBox)this.FindControl("ctl00$ctl40$g_e8454297_4ebf_43d4_b477_e728b5094b63$ff51$ctl00$ctl00$DateTimeField$DateTimeFieldDate");

startDatetb.ReadOnly = true;

Below code is on selectedindexchanged:

SPSite site = new SPSite(SPContext.Current.Site.Url);
SPWeb web = site.OpenWeb();

startDatetb.Text = "";
SPListItemCollection courseTakenCollection = Utilities.GetCourseStartDateByCourseTaken(web, Courseddl.SelectedValue, Studentsddl.SelectedValue);

                    if (courseTakenCollection.Count > 0)
                    {
                        foreach (SPListItem spi in courseTakenCollection)
                        {
                            startDatetb .Text = Convert.ToDateTime(spi["Course_x0020_Start_x0020_Date"]).ToShortDateString();
                        }
                    }

Thanks,

Nilesh

A filter based on a lookup column

$
0
0

Hi,

I have a list based on a custom content type which contains a lookup column. I need to create a view that would allow me to dynamically select a value for the lookup field and filter the list based on the selected value.

On the Edit View screen I can see a Filter section with an option "Show items only when the following is true". It looks like this is what I need but it allows me to hard-code lookup values while I need to be able to select the lookup values and filter the list dynamically.

After I know how to do that on UI, I will need to create C# code that would create such a "dynamic" view programmatically.

Thanks,

Leszek


Wiki: wbswiki.com
Website: www.wisenheimerbrainstorm.com


User Profile Not updating

$
0
0

Hello SharePoint Gurus - I have a custom web part which was updating user profiles. Is there any limitation that it let user update their profile specific number of times?

Regards,


Khushi

Problem when using a codeplex solution: SharePoint 2013 FBA Pack

$
0
0

Hi,

I could successfully deploy a codeplex solution allowing the management of SQL users for a web application where Form-based authentication has been activated (https://sharepoint2013fba.codeplex.com/), on a DEV and a TEST farm (DEV is a single server for web front end and application services) and TEST is a single web front end and a single application server.
Then we deployed the solution to our prod farm (2 web front ends and 2 application servers). Solution was deployed successfully, but when attempting to access any page of the solution (settings, user management,...) we get an error.

Below is the content of the log file for the error. I did some search on the web, and this kind of error is normally due to a problem with the solution. But in this case the solution works for our DEV and TEST farms. So I do not see what kind of problem our PROD environment has.

Thanks

02/02/2016 13:05:16.81     w3wp.exe (0x0F68)                           0x1080    SharePoint Foundation            Runtime                           tkau    Unexpected    System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Resources.FBAPackWebPages.resources" was correctly embedded or linked into assembly "App_GlobalResources.5rkpwe2a" at compile time, or that all the satellite assemblies required are loadable and fully signed.    at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)     at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)     at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParent...    c3405b9d-3b6f-50e0-7247-5d9a3e1d16a9
02/02/2016 13:05:16.81*    w3wp.exe (0x0F68)                           0x1080    SharePoint Foundation            Runtime                           tkau    Unexpected    ...s, StackCrawlMark& stackMark)     at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)     at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)     at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName)     at Visigo.Sharepoint.FormsBasedAuthentication.MembershipSettings.get_MembershipApprovedEmail()     at Visigo.Sharepoint.FormsBasedAuthentication.FBASiteConfiguration.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesA...    c3405b9d-3b6f-50e0-7247-5d9a3e1d16a9
02/02/2016 13:05:16.81*    w3wp.exe (0x0F68)                           0x1080    SharePoint Foundation            Runtime                           tkau    Unexpected    ...fterAsyncPoint)   c3405b9d-3b6f-50e0-7247-5d9a3e1d16a9

Import WordPress self hosted blog into SP Online 2013 (Office 365)

$
0
0

I've seen a powershell option for SP server but that seems like overkill. I've tried loading the WP xml export into Excel and then appending it to an Access database hooked up to the SP blog which works but runs into issues with rich text fields.

Hard to believe something so simple and obviously desirable is ignored by Msft.

aspx files not found

$
0
0

Hallo!

I have 2 environments:
1) Windows 2012 + IIS8.0 +SP2013 (SP1)
2) Windows 2012 R2 + IIS8.5 + SP2013 (SP1 + March2016CU)

I have several sharepoint site collections. each of them is under /sites/ url path. there is no site collection in the root of web application (at "/").

I have custom solution, which contains references to pages under /_layouts folder relative to the root of web application (like /_layouts/myPage.aspx)

When solution was installed on first environment - it works ok.

When it is installed on second environment - requests to pages by the reference relative to root of web application fail with 404 FILE NOT FOUND error. if I reference these pages relative to existing site collections - everything works:
/sites/somesitecollection/_layouts/myPage.aspx - works on both environments
/_layouts/myPage.aspx - does not work on second environment, but works on first one

js files, images, ashx - work fine even if being referenced relative to root of web app. only aspx give problem.

i have custom http modules in solution, and being in ddebug session i can see that request for aspx pages does not reach my handlers. so i suppose it is blocked somewhere before by IIS or other modules.

i've compared modules in both environments and configuration seems to be equal. web.config settings seem to be equal.
solution was instaled from the same installation package on both environments, using same installation steps.

I think there is some difference in IIS, but i dont know what is it and how to workaround it.

So this is the question - what is root of problem and how to workaround it? (creating root site collection is not an option)

Random 404 error on_vti_bin/client.svc/ProcessQuery in Chrome but not IE

$
0
0

We have a jquery form using the CSOM/JSOM connected to external lists (SQL Server) via Knockout js.  Started to get random, intermittent 404 errors when the lists are being loaded and data binding occurs:

GET <url>/_vti_bin/client.svc/ProcessQuery 404 (Not Found)

It breaks some of the bindings and data is not returned for those particular lists in the UI. 

But this happens only in CHROME browser and not all of the time.  Sometimes it is worse than others.  It does not happen in IE at all.  

Due to how intermittent the problem is and the fact it is only happening in Chrome, I am starting to think it is indeed a server issue, or resource issue, with the REST calls? Maybe Chrome is sending the calls in a way slightly different than IE?  

It is very difficult to troubleshoot since it is not happening consistently, and only in the Chrome browser.  Any ideas?

SharePoint 2013 - Pass Item ID to a Custom Page

$
0
0
I have a custom page that I want to link to from a list item and pass the item ID. I am using a calculated column using html code to link to the page, but, I cannot determine the syntax to pass the item ID as a parameter to the page.  The code in the calculated column I am using is similar to:  =”<a href?ID=[ID]'>Link</a>”  The item ID is not being passed.  Please help.  Thanks

MaxProtocolVersion error - SAP Gateway for Microsoft

$
0
0

Hi,

I'm receiving the following error after executing the following code. serviceContext returns MaxProtocolVersion as read only. How to modify MaxProtocolVersion and resolve this issue.

ServiceDetails serviceDetail = ConfigurationReaderHandler.Instance.GetServiceDetails("ZPURCHASE_ORDER_SRV");
serviceContext = new ZPURCHASE_ORDER_SRV(new Uri(serviceDetail.Url));
serviceContext.AddAndUpdateResponsePreference = DataServiceResponsePreference.IncludeContent;//error
//data fill - poItem
serviceContext.AddObject("ZPURCHASE_ORDER_SRV", poItem);
DataServiceResponse response = serviceContext.SaveChanges();
Error:The request requires that version 3.0 of the protocol be used, but the MaxProtocolVersion of the data service context is set to 2.0. Set the MaxProtocolVersion to the higher version, and then retry the operation.

Deployment workflow with Visual Studio and Sharepoint Foundation 2013

$
0
0

Hi,

I want to deploy one solution with Visual Studio 2015 to SharePoint Foundation 2013. Solution it´s a workflow (for test I create a basic workflow). If I deploy over SharePoint Foundation 2013 obtain the error:

Error in instalation of characteristics.

Failed to load receiver assembly "Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" for feature "VSPrueba1_Feature1" (ID: 75c6203e-f136-4dde-95cc-e86ad8a2b479).: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.SharePoint.WorkflowServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)

at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()



WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Any idea?

regards

Content type changes not Propagating to inherited List Or Library?

$
0
0

Hi, 

I have changed content type from content type hub and to make effective I have published and triggered associated timer Jobs.

but these new changes isn't getting propagated to existing List /Library where content type used. rather than its works on Newly created List / Library.

How to propagate new content type changes in existing List and Library.

Thanks/ Siddheshwar Kohale 


Publishing Hyperlink site column accessing issue

$
0
0
Accessing Publishing Hyperlink Site Column from a custom list in a variation Site, make the list content and navigation text empty.

Why do i get i:0#.w|domain\\username through PeopleEditor.Commaseparatedaccounts?

$
0
0

When i do

Console.WriteLine(SPContext.Current.Web.CurrentUser.LoginName);

i get the following response:

i:0#.w|domain\\username

When i do

SPSecurity.RunWithElevatedPrivileges(delegate() {    Console.WriteLine(SPContext.Current.Web.CurrentUser.LoginName);});

i get

domain\appPoolAccount

without i:0#.w|... within the loginname.

Is someone able to explain why this happens?

Also i have tested this morning the same code on SP 2010 and there does this not happen. I always get "domain\user". Is this specific to SP 2013?

Access List Item permission in Sharepoint Online using CSOM without passing credentials

$
0
0

I am trying to access list item permissions using below code snippet and it works in fully controlled environment.

 To work in Online environment it expects credentials. Without credentials it throws exception “The remote server returned an error: (403) Forbidden”.

 I want to achieve this without passing credentials.

Code snippet:

 privatestaticFile GetFileProperties(string fileUrl)

        {            

           ClientContext context =newClientContext("SITEURL");

           Web web = context.Web;

            context.Load(web, d => d.SiteGroups);

            Microsoft.SharePoint.Client.File file = web.GetFileByServerRelativeUrl(Common.GetRelativeUrl(fileUrl));

            context.Load(file, o => o.ListItemAllFields.File.CheckOutType, o => o.ListItemAllFields.ParentList.ForceCheckout, o => o.ListItemAllFields.RoleAssignments.Include(r => r.RoleDefinitionBindings, r => r.Member));

            context.ExecuteQueryWithIncrementalRetry();

           return file;

        }


Thanks, Nilesh

Viewing all 25064 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>