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

Customization/Replacement of person page in mysite without using a farm solution

$
0
0

Hi,

My requirement is to customize person.aspx page in the mysite. I don't want to edit the person.aspx page. I have used a farm solution with a feature which will replace the person page with a custom page on activation. And, it will replace back the original one on deactivation.

Is it possible to create this feature with any client side solution. With javascript code prefarably.

I don't have any idea how to do it without the help of a farm solution. I don't want to go for a farm solution.

Please suggest. Thank you.


WorkFlow Depolyment Issue

$
0
0

We re-installed one of our environments.  Now none of my workflows will function.  I always receive "Something Went Wrong".  So I went to Manage Features and removed one.  Then went to Solutions and deactivated and deleted it. 

I then took the solution file and added it again and activated.  Next, I went to Manage Features and tried to Activate. Again, "Something Went Wrong".  

These workflows are fine in all our other environments and deploy fine in this way.  So something in the farm is wrong.

I see:

Message : The schema for field with this id is wrong or missing.

Feature receiver assembly 'Microsoft.SharePoint.WorkflowServices, Version=15.0.0.0, Culture=neutral, 
          PublicKeyToken=71e9bce111e9429c', class 'Microsoft.SharePoint.WorkflowServices.SPWorkflowPackageFeatureReceiver', 
          method 'FeatureActivated' for feature '11661639-e35e-4424-867f-30bbcee8ed6d' threw an exception: 
          System.InvalidOperationException: Microsoft.SharePoint.SPException: We're sorry, we weren't able to complete the 
          operation, please try again in a few minutes. If you see this message repeatedly, contact your administrator. 

Any thoughts on what we may have misconfigured?

Thanks.


Tom



Tom

UserNotFoundException on ProfileRedirection from userdisp.aspx to person.aspx

$
0
0

UserNotFoundException on ProfileRedirection from userdisp.aspx to person.aspx

Context:
- SharePoint 2013
- AD authentication and FBA authentication.

Issue: I am unable to see the profile of FBA users, when I click on the user's name from any site collection. i.e if I go to any SP group and click on any user , the _layouts/15/userdisp.aspx is throwing below error:

DelegateControl: Exception thrown in OnFormInit() method of child control for ControlId='ProfileRedirection'. Exception: Microsoft.Office.Server.UserProfiles.UserNotFoundException: An error was encountered while retrieving the user profile.
 at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserData(UserProfileManager objManager, Nullable`1 recordId, Guid gAcct, String strAcct, Byte[] bSid, String strEmail, Boolean doNotResolveToMasterAccount)
 at Microsoft.Office.Server.UserProfiles.UserProfile.RetrieveUser(String strAcct, Guid gAcct, Byte[] bSid, Nullable`1 recordId, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
 at Microsoft.Office.Server.UserProfiles.UserProfile..ctor(UserProfileManager objManager, String strAcct, Boolean doNotResolveToMasterAccount, Boolean forceUserIsSelf, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName)
 at Microsoft.SharePoint.Portal.WebControls.MySiteRedirectionUserControl.RedirectIfNecessary(SPListItem user)
 at Microsoft.SharePoint.Portal.WebControls.MySiteRedirectionUserControl.OnFormInit(Object objOfInterest)
 at Microsoft.SharePoint.WebControls.DelegateControl.CallFormInitForChildren(Object objOfInterest)

Application error when access /_layouts/15/userdisp.aspx, Error=An error was encountered while retrieving the user profile.
 at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserData(UserProfileManager objManager, Nullable`1 recordId, Guid gAcct, String strAcct, Byte[] bSid, String strEmail, Boolean doNotResolveToMasterAccount)
 at Microsoft.Office.Server.UserProfiles.UserProfile.RetrieveUser(String strAcct, Guid gAcct, Byte[] bSid, Nullable`1 recordId, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
 at Microsoft.Office.Server.UserProfiles.UserProfile..ctor(UserProfileManager objManager, String strAcct, Boolean doNotResolveToMasterAccount, Boolean forceUserIsSelf, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount)
 at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName)
 at Microsoft.SharePoint.Portal.WebControls.MySiteRedirectionUserControl.RedirectIfNecessary(SPListItem user)
 at Microsoft.SharePoint.Portal.WebControls.MySiteRedirectionUserControl.OnFormInit(Object objOfInterest)
 at Microsoft.SharePoint.WebControls.DelegateControl.CallFormInitForChildren(Object objOfInterest)
 at Microsoft.SharePoint.ApplicationPages.UserDisplayPage.OnInit(EventArgs evtargs)
 at System.Web.UI.Control.InitRecursive(Control namingContainer)
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Troubleshooting done so far:
1.The user profile is existing for the users and I can see the profils from Central Admin. The personal site collection already exists and if I copy the url from Site Collection list in central admin, and paste it into a browser, it works fine.
2.The issue is occurring only for FBA users and redirection is working perfectly for windows AD users (ie redirected to profile page)

SetSingleValueProfileProperty Access denied. You do not have permission to perform this

$
0
0

I am trying to update a user profile's property of a User1. I am a global administrator, all possible permissions granted. I can do it without issues using GUI: SharePoint Online Admin Center>User Profiles>Manage User Profiles.

However, when I am trying to do it programmatically:

ClientContext ctx = new ClientContext("https://tenant.sharepoint.com/sites/SomeSIte");
            ctx.Credentials = new SharePointOnlineCredentials(userName, SecureString);
            Microsoft.SharePoint.Client.UserProfiles.PeopleManager peopleManager = new Microsoft.SharePoint.Client.UserProfiles.PeopleManager(ctx);
            
peopleManager.SetSingleValueProfileProperty(personProperties.AccountName, "AboutMe", updatedValue);
    clientContext.ExecuteQuery();

I receive "Access denied. You do not have permission to perform this"

When I try it with the admin page (notice the change of the url):

ClientContext ctx = new ClientContext("https://tenant-admin.sharepoint.com");
            ctx.Credentials = new SharePointOnlineCredentials(userName, SecureString);
            Microsoft.SharePoint.Client.UserProfiles.PeopleManager peopleManager = new Microsoft.SharePoint.Client.UserProfiles.PeopleManager(ctx);
            
peopleManager.SetSingleValueProfileProperty(personProperties.AccountName, "AboutMe", updatedValue);
    clientContext.ExecuteQuery();

It works for all users with administrator roles, but does not affect regular users at all (the profiles are simply not retrieved and processed). This seems to be by design, since the admin site will contain only admin users.

Why, however, being a global admin and a site collection owner, I receive "access Denied" when attempting to change regular user profile properties in a context of another site collection?

How to change a profile property of a non-admin user?


People Picker in Web Part not always picking up current user as it should, why?

$
0
0

Hi,

I have a people picker in a web part. This web part connects to another web part and passes the current user. The problem is in a multi-user environment I am getting (very rarely, but noticeably) different users populating the Web Part, not the current user it should be. I was thinking this is some sort of Static variable. My connector is as follows in people picker webpart. Is there some way of setting up

 #region Interface communication
        ////web part has to inherits from IWebPartField
        int _requestorUser = 0;
        int _consumerUser = 0;

        [Personalizable()]
        public int RequestorUser
        {
            get
            {
                return _requestorUser;
            }
            set
            {
                _requestorUser = value;
            }
        }

        [Personalizable()]
        public int ConsumerUser
        {
            get
            {
                return _consumerUser;
            }
            set
            {
                _consumerUser = value;
            }
        }

        [ConnectionProvider("Provide Requestor and Consumer from Booking", "RequestorProvider", AllowsMultipleConnections = true)]
        public IUserDetails RequestorProvider()
        {
            return this;
        }

Here are it's properties:

                peopleEditor.AutoPostBack = true;
                peopleEditor.CannotBeBlankErrorMessage = "User requestor cannot be empty";
                peopleEditor.AllowEmpty = false;
                peopleEditor.DoPostBackOnResolve = true;
                peopleEditor.SelectionSet = "User";
                peopleEditor.ValidatorEnabled = true;
                peopleEditor.EnableViewState = true;
                peopleEditor.Height = Unit.Pixel(16);
                peopleEditor.ID = "peopleEditor";
                peopleEditor.MaximumEntities = 1;
                peopleEditor.MultiSelect = false;
                peopleEditor.PlaceButtonsUnderEntityEditor = false;
                peopleEditor.IsClaimsDisabled = false;

public static SPUser PeopleEditorToUser(PeopleEditor pe, bool currentUserAsDefaultUser, ref clsUserRequestor cUserRequest)
        {
            SPUser user = null;
            clsUserRequestor _cUserRequest = new clsUserRequestor();

            try
            {
                if (pe.Accounts.Count > 0)
                {
                    EntityToUser((PickerEntity)pe.Entities[0], _cUserRequest, ref user);

                    if (user == null && currentUserAsDefaultUser)
                        user = SPContext.Current.Web.CurrentUser;
                }
            }
            catch (Exception ex)
            {
                retErrorMessage = "[" + System.Reflection.MethodBase.GetCurrentMethod().Name + "] " + ex.Message;
            }

            cUserRequest = _cUserRequest;
            return user;
        }
Not convinced with this function above for setting peopleeditor????

Any help?

Thanks.

John.

Possible custom action has a url action inside host web?

$
0
0

Hi all,

We are doing a custom action for SharePoint2013.  For the UrlAction, it seems can only start with ~remoteAppUrl and ~appWebUrl.  It that possible to have a default page inside host web not remote web.  If so, what is the steps?

Thanks,

Ning

SharePoint 2013 CSOM - Specified method is not supported

$
0
0

Hi I have the following code (from http://stackoverflow.com/questions/16448214/retrieve-all-documents-from-all-subfolders-in-a-document-library-csom)and when I run it I get "Specified method is not supported" when I access 'result.Value' in the 'Print Results' section. I don't understand why, or how to fix it. Can anyone help?  (To run this code just create a console app and replace 'mysiteurl' with your own). (I don't have enough reputation points to ask the question of the author).

using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Utilities;
.
.

static void Main(string[] args) { using (Microsoft.SharePoint.Client.ClientContext clientContext = new Microsoft.SharePoint.Client.ClientContext("http://mysiteurl")) { var results = new Dictionary<string, IEnumerable<File>>(); var lists = clientContext.LoadQuery(clientContext.Web.Lists.Where(l => l.BaseType == BaseType.DocumentLibrary)); clientContext.ExecuteQuery(); CamlQuery qry = CreateAllFilesQuery(); foreach (var list in lists) { var items = list.GetItems(qry); clientContext.Load(items, icol => icol.Include(i => i.File)); results[list.Title] = items.Select(i => i.File); } clientContext.ExecuteQuery(); //Print results foreach (var result in results) { Console.WriteLine("List: {0}", result.Key); foreach (var file in result.Value) { Console.WriteLine("File: {0}", file.Name); } } Console.Read(); } }

        public static CamlQuery CreateAllFilesQuery()
        {
            var qry = new CamlQuery();
            qry.ViewXml = "<View Scope=\"RecursiveAll\"><Query><Where><Eq><FieldRef Name=\"FSObjType\" /><Value Type=\"Integer\">0</Value></Eq></Where></Query></View>";
            return qry;
        }



Marcel





Possible to write to a SP List via SQL?

$
0
0

Hey SharePoint Fam,

I am using a Room Reservations system from codeproject at http://www.codeproject.com/Articles/588685/ReservationplusofplusresourcesplusinplusSharePoint?fid=1832374&df=90&mpp=25&prof=False&sort=Position&view=Normal&spc=Relaxed&fr=26#xx0xx

The system works perfect and I have tweaked everything exactly as needed from management but now there are 800 reservations they need imported into SharePoint from the old reservation system but the Resource field is locked down so that I cant do a easy import from excel into list.  Was wondering if there is a way for me to do a one time direct write to SQL or powershell somehow that would allow me to import the data into SharePoint list?  I am open to other ideas, but the double booking feature works perfect right now just need to figure a way to get data imported...

Thanks N Advance



How do I move document sets with containing files to another library programmatically?

$
0
0

Is there a way to programmatically move document sets, along with their contents to a different library? I have a scenario where once a workflow is approved, to move the document set along with its documents to an approved library. Same with if rejected, to a rejected library. Will it be possible to accomplish something like this, with the use of an event receiver? I am trying to get this done is a SharePoint Online environment. 

If so..is there anything I can take a look at to get going? Thanks for the ideas.

How to show only SubSites and Pages on left navigation?

$
0
0

Hi,

I would like to replace the left navigation of seattle.master with only SubSites and Pages created within that site.

In 2010 I was using following code in my master page:

<PublishingNavigation:PortalSiteMapDataSource ID="GlobalNavDataSource" runat="server" EnableViewState="false" SiteMapProvider="GlobalNavigation" StartFromCurrentNode="true" StartingNodeOffset="1" ShowStartingNode="false" TrimNonCurrentTypes="Heading"/>
<SharePoint:AspMenu ID="GlobalNav" Runat="server" DataSourceID="GlobalNavDataSource" Orientation="Vertical" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="1" UseSeparateCSS="False" UseSimpleRendering="True"/>

I do not know the equivalent of this in 2013. As I cant modify the master page directly, i'm trying to work with the html file. AspMenu is not recognized within the html file and I tried to work with snippet, but can change it to what i need.

Can someone please guide.


Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

OneDrive for Business API - Shared with Me

$
0
0

I have successfully received a list of items using the OneDrive API, however the items that have been Shared with Me in OneDrive don't appear.

"When a shared folder is added to OneDrive, the folder appears in the root..."

"When enumerating a collection of items, shared folders appear as items with the remoteItem facet."

https://dev.onedrive.com/misc/working-with-links.htm

It would appear the items in OneDrive's Shared with Me section should be returned with the following method:

GET /drive/root/children

However they aren't. 

Is there a separate endpoint for Shared items?

External List form template

$
0
0
I have created a external list and now I would like to have only one form template for new, edit, and display. Is it possible? If yes, what's the best way to achieve it?

Disable weekend and other business days except Thursday in SharePoint 2013 calendar

$
0
0

Hi,

I am using a calendar to conduct training sessions, as per business rule, we can create sessions only on Thursday (not other days).
Is there any way we can disable days in calendar other than Thursday, so that user could no create sessions to other days.



arun singh

Take time while capturing LoginName (SPContext.Current.Web.CurrentUser.LoginName) in SharePoint

$
0
0

Hi 

I hvave added asp dotnet as application inside sharepoint virtual directory , some time its take more time to capture login name

while SharePoint pages working  fine at that time

below code i am using in asp dotnet application

SPContext.Current.Web.CurrentUser.LoginName.ToString();

--

Regards,

Dharmendra 


SharePoint 2013 Standalone Crawl/Search Server

$
0
0

Hello,

I am looking for some documentation on setting up a standalone crawl/search server.  Hopefully a step-by-step guide on installing the SharePoint components needed.  This SharePoint server would be dedicated to the crawl and search role.

Any links or information anyone can share is appreciated.

Thank You


logo on my sharepoint 2013 site

$
0
0
Good afternoon

Put another logo on my sharepoint 2013 site, site administrators can see, but not users. What I have done wrong?

Web App Level Feature not showing in SharePoint 2013

$
0
0
I have a SharePoint 2013 site configured for FBA and Multi Tenancy. In our case, we have a Multi Server Farm, which has a Web Front End, App Server, Search Server, Workflow Server and DB servers. We have custom code to deploy features. We have a web app level feature, which actually creates Custom Diagnostic Areas and Categories. This works fine in our local development environment which is a standalone, but in the multi server farm environment, this feature is not even shown in the Web App Level features. We are not sure, what is going here. Can anyone please suggest, what could be going wrong here.

Ven

Displaying data from another list

$
0
0

Hi guys,

I have two list. The master and secondary. The master list only contains my clients data (e.g. 1000 items). Now in my secondary list I want to my user simply select client name (which feeds from the master list) and then populated other fields in the secondary list based (e.g. location) for the chosen client.

I know i can do this with InfoPath but i wonder if there is any better option (OOB preferably )? such as search query web part or even maybe some JavaScript.

See i have 100 client name so showing the 1000 client names in a drop down is not really clean...

If anyone has some ideas or experience that share with me that would be much appreciated.

Thanks

BalaiP

Nintex supports sharepoint2013 office 365

$
0
0

Hi All,

I want to make sure that Nintex supports sharepoint2013 office 365 to develop forms and aslo attach electronic signature.

Can any one please let me know.

Thank you,

Sowjanya. 

How do I delete or hide the "Name" column from a content type?

$
0
0

I have a content type that is inheriting from a folder content type, and another from the document set content type. Both of these have the "Name" field that is inherited. I do not need to use this "Name" field, and I would either like to delete or hide it from my content types. Is there a way to get this accomplished? 

Is there a way to do this through the UI or programmatically?

Viewing all 25064 articles
Browse latest View live


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