 |
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
Hello,
I am new to this site.
I am the SharePoint Online Administrator. In our organisation we need to perform the audit.
we would like to know the user names that are having full control or are in owners group in all the OneDrive for business site collections in office 365 SharePoint Online.
I was trying to create the script but at some point it is throwing an error. the script is mentioned below.
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
Import-Module ‘C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell’ -DisableNameChecking
$Fulldomain="makaveli.onmicrosoft.com"
#Step2: Connect to SharePoint Online and MsolService
$credential = get-credential
Connect-SPOService -Url “https://makaveli-admin.sharepoint.com/” -Credential $credential
Connect-MsolService -Credential $credential
#Step3: Set OneDrive Storage Quota for all Office 365 Users
$users=Get-MsolUser
$users | Foreach-Object{
$user=$_
$username=($user.userprincipalname –Split “@”)[0]
$Dname=($Fulldomain -Split "\.")
If($Dname[2] -ne $null)
{
$Firstname=$Dname[0]
$Secondname=$Dname[1]
$thirdname=$Dname[2]
$sitename= "https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname+"_"+$thirdname
}
Else
{
$Firstname=$Dname[0]
$Secondname=$Dname[1]
$sitename= "https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname
}
$Groups = Get-SPOSiteGroup -Site $sitename
Foreach($Group in $Groups){
Foreach($Role in $Group.Roles){
If ($Role.Contains(“Full Control”))
{
Write-Host $Group.Title
Write-Host $Group.Users
$users = $Group.Users -join ‘ ‘
$title = $Group.Title
$props = @{Title = $title
Users = $users
Website = $sitename
}
$temp = New-Object psobject -Property $props
$temp | export-csv –append –path C:\SiteOwnerandSites.csv
}
}}}
==================================================
by running the above script I am getting the following error message:
Get-SPOSiteGroup : Cannot get site https://makaveli-my.sharepoint.com/personal/Mohammed_makaveli_onmicrosoft_com.
At line:32 char:11
+ $Groups = Get-SPOSiteGroup -Site $sitename
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-SPOSiteGroup], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.GetSPOSiteGroup
I am able to retrieve the owners details in csv files for SharePoint Online team sites using the below command:
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
Import-Module ‘C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell’ -DisableNameChecking
Connect-SPOService
$AllSites = Get-SPOSite
Foreach($site in $AllSites){
Write-Host $site.Url
$Groups = Get-SPOSiteGroup -Site $site.Url
Foreach($Group in $Groups){
Foreach($Role in $Group.Roles){
If ($Role.Contains(“Full Control”))
{
Write-Host $Group.Title
Write-Host $Group.Users
$users = $Group.Users -join ‘ ‘
$title = $Group.Title
$props = @{Title = $title
Users = $users
Website = $site.Url}
$temp = New-Object psobject -Property $props
$temp | export-csv –append –path C:\SiteOwnerandSites.csv
}
}}}
using Get-spoSiteGroup -site "teamsitename" i am able to retrieve the owners information but if I use "Get-SPOSiteGroup -site "MySite URL of user" its throwing error the same error.
Do let me know if is there any custom cmdlets needed.
Thanks and Regards,
Mohammed Jasim
|
|
|
|
 |
In SharePoint 2016, the compile time for customized XSLT files used for Content Query, Summary Links, and Table of Contents Web Parts is improved. could you pls share if you have more details on this?
Best Regards,
Senthil Gopal
|
|
|
|
 |
Can a SharePoint WFE be added to a farm to host unique web applications that are not part of the existing farm?
We have a test farm which currently hosts our flagship product and other supporting web applications for testing. Can a 2nd WFE be added to the farm to host a distinct/unique separate version of one or more of those apps?
Our goal is to create an area where we can test upgraded versions of the integrated analytics product and support controls (eg- latest version of infragistics). The reason for the 2nd WFE is to have a different GAC for these products and our own to keep things segregated.
Any thoughts / comments
|
|
|
|
 |
We are migrating user's mailbox to cloud and we have script for that. We want to create a page on sharepoint and delegate access to the users that they can accept the terms and when they submit the request workflow trigger the script to move their mailboxes on cloud.
Is there any way through which we can trigger the powershell script through workflow.
|
|
|
|
 |
We have an OLAP project which uses Sharepoint 2013 Excel Services to show excel files that contains external data from SQL Server Analysis Services (SSAS) cube. Our Authentication method to login users is FBA (Forms Based Authentication)
Our Goal is to show only subset of data from SSAS cube for each user based on their role which has already been defined in SSAS side.
FBA authenticates users against AD and all authorized user are already member of respective role in SSAS based on their clearance level. We need Excel Services passes EffectiveUserName to SSAS and for that we enabled the EffectiveUserName in global settings of Excel Services on SharePoint central admin.
Than in Excel, we have enabled the Windows Authentication in the Excel Service Authentication Settings of Connection Properties as we read on some blog posts. But after accessing it via the SharePoint, the following error occurred.
“The data connection uses Windows Authentication and user credentials could not be delegated.” As I already stated, I don't want to delegate user credentials to SSAS. It's already been configure for Excel Services to use single account to connect to Analysis Services. I only want to pass EffectiveUserName.
Using windows authentication is not an option because users access the site from extranet and internet
|
|
|
|
 |
I have the following Powershell function:
function Add-WebPartToPage {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)]
[System.Object]$web,
[Parameter(Mandatory=$true, Position=1)]
[string]$pageTitle,
[Parameter(Mandatory=$true, Position=2)]
[Microsoft.SharePoint.SPList]$list,
[Parameter(Mandatory=$false, Position=3)]
[System.Object]$webpart,
[Parameter(Mandatory=$false, Position=4)]
[string]$webPartTitle,
[Parameter(Mandatory=$false, Position=5)]
[string]$panelTitle,
[Parameter(Mandatory=$false, Position=6)]
[int]$CSPUElevel,
[Parameter(Mandatory=$false, Position=7)]
[int]$panelType
)
Process
{
#if webpart specified then add it to the page
if($webpart)
{
$pageName = $list.Title + "/$pageTitle.aspx"
$pageName = $pageName -replace " ",""
$page = $web.GetFile($pageName)
$page.CheckOut()
$mgr = $web.GetLimitedWebPartManager($pageName, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
if($webPartTitle)
{
$webpart.Title = $webPartTitle
}
$webpart.ChromeType = "None"
#++ Extended Settings
if($webpart.GetType().Name -eq "DynamicWebPart")
{
#
$pinProperties = $webpart.GetType().GetProperties()
foreach ($prop in $pinProperties)
{
if(($panelTitle) -and ($prop.Name -eq "PanelTitle"))
{
$webpart.PanelTitle = $panelTitle
}
if(($CSPUElevel) -and ($prop.Name -eq "CSPUElevel"))
{
$webpart.CSPUElevel = $CSPUElevel
}
if(($panelType) -and ($prop.Name -eq "PanelType"))
{
$webpart.PanelType = $panelType
}
}
}
#-- End of Extended Settings
$mgr.AddWebPart($webpart, "FullPage", 0)
Write-Host -f Green "Webpart $webpart.WebBrowsableObject added to the page"
$page.CheckIn("Checked in Automatically")
#$page.Publish("Published Automatically")
}
}
}
Everything works fine until it gets to the extended properties of the webpart. Within that logic, the panel title will set correctly. This is a direct string assignment to the custom property. However, the CSPUElevel and PanelType are dropdowns and the assignment is never made. What is more interesting is that the CSPUElevel and PanelType don't seem to be exposed as custom properties in the same way as the Panel Title. In other words, the test for $prop.Name is never equal to "CSPUElevel" or "PanelType".
Any advice/direction is greatly appreciated.
|
|
|
|
 |
I am new to SharePoint and need to allow a SharePoint portal to load my asp .net application into the portal from the application server where I have hosted the asp .net application. I think I can use a SharePoint WebPart page viewer to do this by assigning the application URL to the page viewer. I don't know if this will allow the SharePoint user's to use the fully functional asp .net application or will it just show a specific web page and not allow the user to use the full functionally of the website. Can someone help?
|
|
|
|
 |
The page viewer web part, should for the most part, allow your asp.net application to function fine within it, as would an iframe.
|
|
|
|
 |
Before showing info-path form ,need to open model popup (i.e) confirmation Box , if user clicks "ok" then open infopath form in Edit mode, "cancel" then open infopath form in Read-only mode.
FormCode.cs file public void FormEvents_Loading(object sender, LoadingEventArgs e) { StringBuilder sb = new StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append(@"var r = confirm('do you want to Checked-Out?');"); sb.Append(@"if((r == true))"); sb.Append(@"{"); string s = Success(); sb.Append(s); sb.Append(@"}"); sb.Append(@"else"); sb.Append(@"{"); string s1 = Failure(); sb.Append(s1); sb.Append(@"}"); sb.Append(@"</script>"); } public string Success() { string result = string.Empty; XPathNavigator root, infopathNode; root = this.MainDataSource.CreateNavigator(); infopathNode = null; infopathNode = root.SelectSingleNode(path, this.NamespaceManager); DeleteNil(infopathNode); infopathNode.SetValue("0");
result = "alert('sucess method triggered');"; return result; } public string Failure() { string s = string.Empty; XPathNavigator root, infopathNode; root = this.MainDataSource.CreateNavigator(); infopathNode = null; infopathNode = root.SelectSingleNode(path, this.NamespaceManager); DeleteNil(infopathNode); infopathNode.SetValue("0"); s = "alert('Failure method triggered');"; return s; }
-- modified 25-Apr-16 7:45am.
|
|
|
|
 |
How can I change what is written on the Report viewer web part when it is waiting for the parameters to be set like :
Microsoft SQL Server Reporting Services
Specify Parameter Values
Report parameter values must be specified before the report can be displayed. Choose parameter values in the parameters area and click the Apply button.
Also, how to change the text of the apply button in the parameters area:
Apply
|
|
|
|
|
 |
Im using rich text editor while adding the event in calender page.In demo server rich text editor working fine in Internet explorer.but in live server its not working in any of the browser its showing message like "Click for help about adding basic HTML formatting.".please help me.
|
|
|
|
 |
Hi,
I just want like this , there are to buttons 1 is upload from file dialog and another scan from scanner ,if they click upload it will fetch file from file dialog (working now) & if they click scan it has to open scan dialog , then it has to scan & document should come, then if i click submit it will save in corresponding custom list as attachment.
i need programmatically
|
|
|
|
 |
That's not how this site works. We're happy to help with specific questions about code you have written, but nobody is going to write the code for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Well, friend it R&D task and its doable.
Research on Kofax tool, This will allow you do this stuff.
I found reference on site
- "Kofax Express is an on ramp for Microsoft Office SharePoint that makes it easy for anyone to scan, organize and store documents to a SharePoint document repository for archiving and records retention and disposition."
My one of friend worked on such project with kofax/sharepoint.
Kofax site[Read More]
Hope this helps.
|
|
|
|
 |
Dears
i have pages list which contains pages from custom content type(NewsCT is its name) in subsite name News
NewsCT inherit article page
NewsCT contain a field "ArchivingDate"
i need to move this page with all its related items (like images ,...etc) to another subsite "Archived News" on the date specified in "ArchivingDate"
i need this solution as some kind of news archiving as the client request to let the users able to view the old(archived) news
kindly advice
|
|
|
|
 |
I have a custom input form some of the fields are coming from a list in SharePoint 2010. I have a check box control which is populated by a list item. there are around 10 rows. Now i want when a user select a check box list item, a text box should appear beside it. for example I have a list called subjects, which have column name title and the entries are physics, maths, chem etc... Now when a user select physics from the check box list a text-box should appear beside it and user should be able to write on text box.
|
|
|
|
 |
Sounds liek you will want to have an event on the checkbo, where it will show or hide the textbox based on the checkbox being selected.
What have you tried so far?
|
|
|
|
 |
protected void chkboxIncentive_SelectedIndexChanged(object sender, EventArgs e)
{
foreach (ListItem checkbox in chkboxIncentive.Items)
{
//If this particular item is checked
if (checkbox.selected)
{
checkbox.Text = String.Format("{0}<input id=\"TextBox{0}\" name=\"TextBox{0}\" / >", checkbox.Value);
//TextBox tb = new TextBox { ID = checkbox.Value };
//Input.Controls.Add(tb);
}
}
}
its throwing error at ListItem saying ambiguity and another error at selected and value
modified 18-Jan-16 8:28am.
|
|
|
|
 |
checkbox.Text = String.Format("{0}<input id=\"TextBox{0}\" name=\"TextBox{0}\" / >", checkbox.Value);
This is going to cause you problems. You are on the right path with adding the textbox to the controls of the container tho, with:
Although I dont know what "Input" is, But I assume its a container for your controls.
What are the exact errors you are getting?
You could also create the text boxes when you create the checkboxes and then hide them by default, only showing when you need them?
|
|
|
|
 |
I am getting error at foreach loop when i am using Listitem . the error says there is a ambiguity between system.data and microsoft.sharepoint
|
|
|
|
 |
OK, Now we are getting somewhere.
It means, its cannot decide which 'ListItem' to use I would assume. Add the namespace infront of the class, Something like System.Data.ListItem - tho im not sure this is correct and I would use System.Web.UI.WebControls.ListItem but it all depends on what 'ListItem' class you are trying to use.
-DB
|
|
|
|
 |
I used Microsoft.SharePoint.Client.ListItem
still I am getting error.
|
|
|
|