which country user step here?

Tag Cloud

MOSS (47) SharePoint 2007 (37) SharePoint 2013 (31) SharePoint 2010 (23) MOSS admin (17) PowerShell (17) admin (17) developer (16) List (15) WSS (14) sql query (14) MOSS SP2 (13) end user (11) scripting (11) wss V3 (11) permission (10) sql (9) Moss issue (8) search (8) database (7) RBS (6) Service Pack (6) reportadmin (6) workflow (6) CU (5) Excel (5) Patch (5) client object model (5) Client Code (4) Command (4) Cumulative Updates (4) IIS (4) SharePoint 2019 (4) SharePoint designer (4) office 365 (4) stsadm (4) user porfile (4) ASP.NET (3) Content Database (3) Groove (3) Host Named Site Collections (HNSC) (3) SharePoint 2016 (3) Tutorial (3) alert (3) authentication (3) batch file (3) codeplex (3) domain (3) error (3) incomming email (3) issue (3) restore (3) upload (3) Caching (2) DocAve 6 (2) Folder (2) Index (2) Internet (2) My Site Cleanup Job (2) My Sites (2) News (2) People Picker (2) Share Document (2) SharePoint admin (2) View (2) Web Development with ASP.NET (2) add user (2) audit (2) coding (2) column (2) deploy solution (2) download (2) enumsites (2) exam (2) export (2) june CU (2) load balance (2) mySites (2) network (2) orphan site (2) performance (2) profile (2) project server (2) query (2) security (2) server admin (2) theme (2) timer job (2) training (2) web master (2) web.config (2) wsp (2) 70-346 (1) 70-630 (1) AAM (1) Anonymous (1) Approval (1) AvePoint (1) Cerificate (1) Consultants (1) Content Deployment (1) Content Type (1) DOS (1) Document Library (1) Drive Sapce (1) Excel Services (1) Export to Excel (1) Feature (1) GAC (1) Get-SPContentDatabase (1) Get-WmiObject (1) HTML calculated column (1) ISA2006 (1) IT Knowledge (1) ITIL (1) Install (1) Link (1) MCTS (1) Macro (1) Masking (1) Migration (1) NLBS (1) Nintex (1) Office (1) Open with Explorer (1) ROIScan.vbs (1) Reporting Services (1) SPDisposeCheck.exe (1) SQL Instance name (1) SSRS (1) Sandbox (1) SharePoint Online (1) SharePoint farm (1) Shared Services Administration (1) Site Collection Owner (1) Site template (1) Skype for business (1) Steelhead (1) Teams (1) URLSCAN (1) VLOOKUP (1) WSS SP2 (1) XCOPY (1) abnormal incident (1) admi (1) app (1) application pool (1) aspx (1) availabilty (1) backup (1) binding (1) blob (1) branding sharepoint (1) cache (1) calendar (1) change password (1) connection (1) copy file (1) counter (1) crawl (1) custom list (1) domain security group (1) event (1) excel 2013 (1) facebook (1) filter (1) fun (1) group (1) iis log (1) import (1) import list (1) improment (1) interview (1) keberos (1) licensing (1) log in (1) metada (1) migrate (1) mossrap (1) notepad++ (1) onedrive for business (1) operation (1) owa (1) process (1) publishing feature (1) resource (1) send email (1) size (1) sps2003 (1) sql201 (1) sql2012 (1) sub sites (1) system (1) table (1) task list (1) today date (1) trial (1) vbs (1) video (1) web part (1) web server (1) widget (1) windows 2008 (1) windows 2012 R2 (1) windows Azura (1) windows account (1) windows2012 (1) wmi (1)
Showing posts with label MOSS. Show all posts
Showing posts with label MOSS. Show all posts

Wednesday, October 24, 2012

SharePoint 2007 Incoming Email issues

 

Issues : Unable to deliver the incoming email to the SharePoint list.

Investigation step have done:

  • checking with exchange team to make sure the email is delivered to the web front end server
  • checking on the timer job is running succeeded and started time is up to date ( for my issues is notice the started time is showed 1 week ago and not up to date)
  • checking the C:\inetpub\mailroot\Drop at the web front end server and notice all the incoming email is stuck here. (bingo!!)

Resolution:

  • Try to stop and start the Windows SharePoint Services Incoming E-Mail at SharePoint from CA and trigger the issues below : Incoming Email service in Central Administration was hung in a "Stopping" status, thus my incoming emails were not being delivered.
    • found the solution here:
    • Windows SharePoint Services Incoming E-Mail stuck in Stopping status

      1) Microsoft Support ran STSADM -o enumservices > c:\services.txt   to list the services in a text file.
      Then they opened the text file and found the SPIncomingEmailService and copied that entry.
      Then they ran STSADM -o provisionservice -action start -servicetype"Microsoft.SharePoint.SPIncomingEmailService, Microsoft.SharePoint, Version=12.0.0.0, Culture..."

            Make sure the string for the service type above is in quotations and that you copy the entire string from the services txt file...above I abbreviated it but you need the entire string.
      That made the service start up immediately.


      2) Then I had to go into Central Administration - Operations - Incoming Email settings and chnage my from Automatic to Advanced and point to the proper Drop folder.  I should have to do that, but in my case I had just removed a second front end server out of the farm and SharePoint kept thinking SMTP should be on the other server that was decommissioned.


      3) Then an IISreset /noforce  and everything started sending.
      Hope this fix helps someone else

       

Cool!! this is help , after started back the service after around after 12hours all the email stuck at drop box is clean and the started time at timer job is up to date.

Unable to find the root cause but found some nice article explain about :

Incoming Email Enabled Libraries in MOSS2007 RTM using Exchange 2007 in an Active Directory Domain

Some key point like to keep here:

  • If you select Advanced you are given the opportunity at the bottom of this page to specify which folder location will be used for the incoming mail drop folder. By default the drop folder will be the one used by the SMTP service which is located at C:\InetPub\Mailroot\Drop
    Once mail is sent to this drop folder by the SMTP mail flow process then it is the responsibility of the SharePoint Timer Service to pick the mail up and distribute it to the correct List or Library.
  • troubleshooting tips
    1. * Ensure that the Central Administration Application pool account and the SharePoint Timer Service account are using the same service account. THIS ONE IS IMPORTANT. A lot of errors stem from these accounts not being the same DOMAIN service account.


      * Make sure the above account has access rights to all files on the server used by incoming mail such as the sharepointemailws.asmx file on the Moss server that is receiving the incoming mails. Alternatively make these accounts local administrators on the web servers receiving the incoming mail


      * Make sure the app pool account for the web application you are trying to mail enable is running as the MOSS Administrator account you are running Central Administration under.


      * Grant rights to the OU you have created in AD to the app pool account you setup.


      * Create a SMTP send connector in Exchange to deliver mail to machine.domain.name where your MOSS SMTP service is running.


      * Make sure the account that is running the SharePoint Timer Service has delete rights to the drop folder or you will receive duplicate E-Mails


      * When using Outlook 2003 may need to send the attachment as a Uuencode or Binhex format in order to get the attachment listed separately in the List or Library. Also see this MS article for another workaround for adding two attributes to the contact in AD
      http://support.microsoft.com/default.aspx?scid=kb;en-us;926891


      * If you have installed Forefront security for SharePoint then you may encounter a problem where the E-Mail will arrive in the drop folder and then disappear without reaching the document library. This MS article explains the way to fix this.http://support.microsoft.com/kb/934285


      * If you have used permissions on the document library to control who can send the process is based on the header of the E-Mail , it is then checked against the users who have rights to the list or library.


      * If you see content in the document library that is assigned to the system account it means that the document library has treated the incoming mail as an anonymous users due to not be able to resolve the name in the list of users with rights to submit mail. You will have to allow the library to accept mail from all senders to see this.
      * When sending to a calendar list to be sent correctly send as a .vcf file from a new appointment or meeting request in Outlook
      Troubleshooting – continued


      * If you try and setup a workflow on the mail as it arrives in the library and it fails make sure that the Timer Service and the Central Admin Application pool account are using the same Domain service account.


      * When supporting multiple SMTP domains make sure that you add these domains to the SMTP domains in the SMTP settings on the Moss Server hosting the SMTP service. SharePoint can support external domain names as long as the domains are supported by the mail routing topology and also the Moss servers SMTP domain name listing.


      I hope you found this article useful , please do feel free to send me comments and keep checking our web site for more downloads on configuring some of the cool new features of Moss2007.

Sunday, May 22, 2011

SharePoint Calculated Value Nested

http://office.microsoft.com/en-us/windows-sharepoint-services-help/if-function-HA001161010.aspx

 

keep track this formula for nested function , so i can use this to select other option to show here as lookup list

Example set 3

image

45
=IF([Score]>89,"A",IF([Score]>79,"B", IF([Score]>69,"C",IF([Score]>59,"D","F"))))
Assigns a letter grade to the first score (F)

90
=IF([Score]>89,"A",IF([Score]>79,"B", IF([Score]>69,"C",IF([Score]>59,"D","F"))))
Assigns a letter grade to the second score (A)

78
=IF([Score]>89,"A",IF([Score]>79,"B", IF([Score]>69,"C",IF([Score]>59,"D","F"))))


Assigns a letter grade to the third score (C)

 

In the preceding example, the second IF statement is also the value_if_false argument to the first IF statement. Similarly, the third IF statement is the value_if_false argument to the second IF statement. For example, if the first logical_test ([Score]>89) is TRUE, "A" is returned. If the first logical_test is FALSE, the second IF statement is evaluated, and so on.

 

The letter grades are assigned to numbers using the following key (assuming use of integers only).

 

IF SCORE IS
THEN RETURN

image

Monday, April 25, 2011

About Alert email issues

Issues : new item assign to task list , owner not receive alert

Step to check:

stsadm -o getproperty -pn job-immediate-alerts -url http://abc.com/sites/XXXX

this command is check the alert timer job status :

Restults:
<Property Exist="Yes" Value="every 5 minutes between 0 and 59" />
which  mean the alert timer will check every 5 minutes.
*normally this is standard setting

Next Step:

Run following command to check from SQL server whether new item created or not :
· use [content_DB
]
select top 50 itemname,EventData,ACL,* from EventCache order by EventTime desc

you should see the new created item , else which mean something wrong.

Solution :

create new list and try again.

ha ha..is not perfect solution but anyhow let me resolve mine problem.

just notice have good post about the alert :
http://msmvps.com/blogs/bradley/archive/2009/03/22/how-to-troubleshoot-alerts-in-wss-3-0-moss.aspx

Wednesday, February 16, 2011

Introduction to workflows

Microsoft Office SharePoint Designer 2007 another article from Microsoft

 

Across your enterprise, teams use Microsoft SharePoint sites to collaborate on documents and share information. You want to build a SharePoint application that improves team productivity and efficiency, but you don’t want to write code. Where do you start?

With Microsoft Office SharePoint Designer 2007, you can design workflows that add no-code application logic to your SharePoint sites and applications. Using the Workflow Designer, you create rules that associate conditions and actions with items in SharePoint lists and libraries. Changes to items in lists or libraries trigger actions in the workflow.

For example, suppose that a team's primary responsibilities are writing, revising, and approving contracts. These contracts are stored in document libraries on the team site. With Office SharePoint Designer 2007, you can create a workflow that sends a notification e-mail message to the reviewer when a new contract has been uploaded to the site. At the same time, the workflow creates a task in the Tasks list for the reviewer. When that person reviews the contract and marks the task as complete, different actions are triggered depending on whether the contract is assigned a status of Approved or Rejected.

Team efficiency and productivity improve because the workflow drives the process so that the team can focus on doing the work, rather than on managing the workflow. And no programming is required to build such a solution. By creating rules in the Workflow Designer, you can quickly add interactivity to a SharePoint solution or application.

This article introduces the basics of workflows. When you understand the basic building blocks of a workflow — events, actions, conditions, and steps — you can quickly add application logic to your SharePoint applications.

IMPORTANT   To create a workflow, your SharePoint site must be located on a server running Windows SharePoint Services 3.0.

In this article

What is a workflow?

Your team uses a SharePoint site to collaborate and store valuable business information in SharePoint lists and libraries. With Office SharePoint Designer 2007 , you can now attach application logic to documents or items in these lists and libraries.

With the Workflow Designer, you can attach a sequence of conditions and actions to a list or library — this sequence is a workflow. A workflow is a natural way to organize and run a series of actions that correspond to a work process. This process can control almost any aspect of a list item in Windows SharePoint Services 3.0, including the life cycle of that item. The workflow can include both actions performed by people (or workflow participants) and actions performed by the workflow. Workflow participants can interact with the workflow through the Tasks list, where a workflow can create a task for someone and remain paused until the task is marked complete.

Workflows can be as simple or as complex as your business processes require. You can create a workflow that the user initiates, or a workflow that is initiated automatically based on an event, such as when a list item is created or changed.

In general, when you use Office SharePoint Designer 2007 to design a workflow, you follow these basic steps:

  • Use the Workflow Designer to choose and assemble the conditions and actions that define the steps of the workflow.
  • Have Office SharePoint Designer 2007 automatically generate any ASP.NET forms for workflow initiation or any custom SharePoint task, if necessary.
  • Customize the workflow forms, if necessary.

You can think of a workflow as a flowchart of actions with a beginning, an end, and a sequential flow from start to finish. Workflows can incorporate parallel branches, but ultimately they progress from the initial action to the final action.

For example, suppose you were to chart the workflow described earlier that routes a document in Windows SharePoint Services 3.0 for approval. When the workflow starts, it automatically notifies the specified reviewer by e-mail that they have a document to review. The reviewer then reviews the document, and changes the status of the document to indicate that they have completed their task, and whether they have approved or rejected the document. Based on the reviewer response, the workflow proceeds down one of two parallel branches. If the reviewer approves the document, the workflow moves the approved document to a specific document library, and then sends an e-mail message to the entire team notifying them of the approved document. If the reviewer rejects the document, the workflow notifies the document author of this. In either case, the workflow then reaches its end and the process is completed.

Workflow process flow chart

Top of Page TOP OF PAGE

What are events, actions, conditions and steps?

These are the building blocks of a workflow. A workflow consists of one or more steps, and each step consists of actions and any associated conditions. Each workflow is initiated by an event.

WHAT ARE EVENTS?

An event is what starts or initiates a workflow. There are exactly three events that can start a workflow:

  • An item is created.
  • An item is changed.
  • A workflow participant clicks a start button on the SharePoint site.

It is important to understand that a workflow created with Office SharePoint Designer 2007 is always attached to exactly one list or library in a SharePoint site. When you design a workflow, you choose which list to attach it to. An event in this list starts the workflow.

You can create a workflow that a participant starts manually, or a workflow that is started automatically when a list item is created or changed. For example, in the document approval workflow, you want to design the workflow so that it starts automatically whenever someone adds a document to the Shared Documents library. On the File menu, point to New, and then click Workflow. In the Workflow Designer, you see the following page.

Define workflow - document approval

When a workflow participant starts a workflow manually, that person first browses to the list or library that the workflow is attached to. Any person with at least the Contribute permission level can initiate a workflow that is designed to start manually. The participant clicks an item, clicks Workflows on the menu, and then chooses a workflow from a page that displays all workflows associated with that item. The participant fills out a workflow initiation form, if necessary, and then initiates the workflow by clicking the start button on the form. Initiating a workflow creates a new instance of that workflow for that specific item.

Workflow command on list item

NOTE   The Workflows command is available only when the item is in a list or library that has at least one workflow attached to it.

For a workflow that is started manually, the initiation form can be as simple as the following.

Example of workflow start button on list item

You can also add custom fields to an initiation form when you design the workflow. Workflow participants can then provide information to the workflow by filling out this form, and those settings are passed to the workflow. A new workflow instance starts, and that workflow can then look up and use the information provided through the form at any point in the workflow.

WHAT ARE ACTIONS?

An action is the most basic unit of work in a workflow. Office SharePoint Designer 2007 provides a set of ready-made, reusable actions for you to incorporate into your workflow. For example, your workflow can:

  • Create, copy, change, or delete list items (including documents).
  • Check items in or out.
  • Send an e-mail message.
  • Create a task for someone on the Tasks list of your team site.
  • Collect data from a participant that can be referenced later in the workflow.
  • Pause or stop the workflow.
  • Log workflow information to a History list to use for repudiation or workflow debugging.
  • Set workflow variables or perform calculations.

A workflow can contain any number of actions. The actions just listed are performed by the workflow, but other actions might be performed by workflow participants. For example, the document approval workflow is comprised of five actions. Four of these actions are performed automatically by the workflow, but one of these actions — actually reviewing the document — is done by a workflow participant. Actions done by a workflow participant are represented by tasks assigned to that person in the Tasks list. The five actions in the example workflow are:

  • Send an e-mail message to notify the reviewer
  • Review the document (a task assigned to a workflow participant)
  • Move the document to the Approved document library
  • Send an e-mail message to notify the team
  • Send an e-mail message to notify the document author

In the most basic sense, when you design a workflow, you identify the necessary sequence of actions, and then you assemble that sequence of actions by using the Workflow Designer. For example, in the document approval workflow, the first action that you want is to send an e-mail message to notify the reviewer.

Flowchart, send e-mail to reviewer

So in the Workflow Designer, you choose that action for the first step in the workflow.

Actions list

WHAT ARE CONDITIONS?

When you design a workflow, you can use the Workflow Designer to create rules that apply conditional logic to SharePoint lists and items. A rule establishes a condition where the workflow performs the associated action only if that condition is true. For example, you can create a rule where the workflow sends a reviewer an e-mail message only if an item is created by a specific person. You can also add clauses to a condition. For example, you can create a rule where a reviewer is sent an e-mail message only if an item is both (1) created by a specific person and (2) the document title contains specific keywords. Finally, you can associate multiple actions with one condition. For example, you can create a rule where if an item is created by a specific person, then (1) the reviewer is sent an e-mail and (2) workflow information is logged to the History list.

Choose conditions and actions

To sum up, a rule is a condition associated with one or more actions: If all clauses in the condition are true, do all the associated actions.

In the previous example, the user specified only one condition. However, you can create multiple conditions for a step in the workflow. Multiple conditions create branches in the workflow: If condition A is true, do one action; if condition B is true, do a different action. To add a branch to a step, click Add 'Else If' Conditional Branch. For example, in the document approval workflow, if the reviewer approves a document, the workflow performs one action (or series of actions); if the reviewer rejects a document, the same workflow performs a different action. This is a conditional branch.

Flowchart example, approver reviews document

In the Workflow Designer, this step has two branches and looks like the following. The green diamond indicates that the step has a conditional branch.

Conditional branch with two conditions

You can also create a branch that has no specific condition. This way, the workflow performs one action if a condition is true and a different action if the condition is false. For example, the following step in a workflow sends a message to the team only if the condition is true; else, the workflow sends a message just to the document author. By adding a branch with no specific conditions, the workflow performs the action in that branch in any case where the condition in the first branch is false.

Conditional branch with no second condition

NOTE   Branching in a workflow cannot extend from one step to another. A set of 'Else If' branches is always contained in a single step.

Office SharePoint Designer 2007 provides several ready-made, reusable conditions for you to incorporate into your workflow. For example, you can specify that the workflow performs the associated actions only if an item:

  • Is created or modified in a specific time span.
  • Is created or modified by a specific person.
  • Has a title field that contains specified keywords.
  • Is a file of a specific type or has a file size in a specific range. (This condition is available only when the workflow is attached to a document library.)

In addition, you can create custom conditions and advanced conditions where you can specify a wide range of parameters. With custom conditions, you can compare a field in the current list with a value. For example, you can create a custom condition where if the Approval Status field equals Approved, do the associated action. With advanced conditions, you can compare one value to another value. This allows you to create a comparison between a field in any list and a value from another list. For example, you can create an advanced condition for the Shared Documents library where if the value of the Status field in the Tasks list equals Pending, do the associated action.

NOTE   An action does not require a condition. For example, the first step of the example document approval workflow sends an e-mail to notify the reviewer. This action does not have a condition associated with it.

PARALLEL VS. SERIAL ACTIONS

When you have more than one action associated with a condition, the actions can be set up to run at the same time (parallel) or one after another (serial).

Run actions in parallel or serial

Serial actions    For example, in the document approval workflow, you can set up two actions so that when a document is approved, a message is sent and then (afterward) the document is copied to the Approved document library. In the Workflow Designer, then indicates that the second action occurs after the first.

Serial action with 'then'

Parallel actions    For example, in the document approval workflow, you can set up two actions so that when a document is approved, a message is sent and (at the same time) the document is copied to the Approved document library. In the Workflow Designer, and indicates that the second action occurs at the same time as the first.

NOTE   Parallel actions are not absolutely simultaneous; the exact order cannot be specified and may vary each time the workflow runs.

Parallel action with 'and'

NOTES

  • In any given rule (conditions and actions), all actions must be either serial or parallel.
  • A set of serial or parallel actions must be contained within a single step.
WHAT ARE STEPS?

A workflow is comprised of one or more steps. Each step can contain any number of actions and associated conditions. You can think of steps simply as pages in the Workflow Designer. For example, the document approval workflow has two steps, as shown in the Workflow Designer.

Workflow steps, add a step

Steps allow you to group conditions and actions so that one set of rules (conditions and actions) can be evaluated and performed before a second set.

One step or many? Some workflows can be designed either as a sequence of actions within one step, or as a sequence of steps.

For example, the following three actions could be Step 1 of a basic one-step workflow.

Multiple actions in one step

The same three actions could be separated into several steps.

Multiple actions in many steps

How you structure your workflow into steps depends on what you want each step to accomplish. The rules in one step are processed to conclusion before going on to the next step, so you want to group in the same step any rules necessary to effect the specific action or actions that you want.

More specifically, each step can hold one set of 'Else If' conditional branches, where the actions in each branch are performed only when the associated condition is satisfied. In this case, additional steps are needed only when:

  • Multiple sets of 'Else If' conditional branches need to be evaluated.
  • You need to separate a branched statement from a non-branched statement.

You can also use steps simply as a way to organize your workflow. For example, a workflow might have many actions in a step that doesn't use conditions. In this case, you might want to separate the actions into steps just to better organize them.

Top of Page TOP OF PAGE

What are workflow forms?

To make your workflow more dynamic and flexible, you can add a form to the workflow. With a form, you can collect information from workflow participants at predefined times in the workflow, and make it possible for participants to interact with the tasks for that workflow.

With Office SharePoint Designer 2007, you can create two types of workflow forms:

  • An initiation form gathers information from the workflow participant when they start the workflow. Initiation forms are displayed to users when they manually start a workflow on a given SharePoint item. With an initiation form, users can specify additional parameters or information about the workflow as it applies to the given SharePoint item. For example, you might use an initiation form to ask who should review a document and by when the review should be completed. Not all workflows need initiation forms. If you do need one, Office SharePoint Designer 2007 automatically generates an ASP.NET initiation form according to your initiation specifications.
  • A custom task form allows workflow participants to interact with tasks in the Tasks list on a SharePoint site. With the Custom Task Wizard, you can easily create custom form fields and add them to a custom task form. When you finish designing the workflow, Office SharePoint Designer 2007 automatically generates the ASP.NET forms for your custom tasks. Then, when the workflow runs and tasks are created, the user browses to the Tasks list on the SharePoint site, marks the task as completed, and enters any optional or required information specific to the workflow. The workflow can then respond to those changes as specified in the workflow, or look up and evaluate that information in later steps of the workflow.

After Office SharePoint Designer 2007 automatically generates the ASP.NET forms, you can customize them. Workflow forms are ASP.NET pages with a Data Form Web Part and a master page applied to it. These .aspx files are stored on the SharePoint site with the workflow source files. You can open and customize these forms as you would any other .aspx file.

Top of Page TOP OF PAGE

Where are workflows stored?

Workflows are stored in a site-level document library called Workflows. This document library is created automatically by Office SharePoint Designer 2007. In the Folder List, the Workflows document library displays the workflow icon instead of the usual list or document library icon. By default, the Workflows document library is hidden from the browser and has no List Views, such as AllItems.aspx or EditForm.aspx. This document library contains a folder for each workflow created with Office SharePoint Designer 2007. The folder contains all the source files necessary for the workflow, including:

  • The workflow markup (.xoml) file (needed only when the workflow uses conditions).
  • The workflow rules file.
  • The workflow configuration file.
  • Any .aspx forms needed, such as initiation forms (for workflows that are started manually) or custom task forms.

To modify an existing workflow, you can either click Open Workflow on the Filemenu or double-click the .xoml file in the Folder List. This opens the workflow to its first step in the Workflow Designer. If you click Back to view the initiation settings of the workflow, you see that you cannot change which list or library the workflow is attached to. After a workflow is attached to a list or library by using Office SharePoint Designer 2007, this association cannot be changed.

Workflows in folder list

The Workflow Designer provides an action called Log to History List. You might use this action when you want to keep a record of the workflow history for investigating errors or for tracking and repudiation purposes. When you create a workflow that uses the action Log to History List, Office SharePoint Designer 2007 automatically creates a list called Workflow History. This list has columns for such information as user ID, date, event, and error description. Like the Workflows document library, by default the History list is hidden from the browser but can be seen in the Folder List.

Workflow history in folder list

The Workflow Designer provides three actions that interact with the Tasks list: Assign a To-Do Item, Collect Data from a User, and Assign a Group Survey. When you create a workflow that uses any of these three actions, Office SharePoint Designer 2007 automatically creates the .aspx form, the content type for the task, and the Tasks list, if necessary. By default, the Tasks list can be viewed in the browser, unlike the Workflows document library and Workflow History list.

Tasks list in folder list

Top of Page TOP OF PAGE

Where can I check the status of a workflow?

You can easily view the progress of workflows on a selected item through the browser. The All Items view of a list or document library displays the current status of workflows running on an item. In addition, each item has a Workflows page where you can view the following information:

  • All workflows currently running on that item.
  • All workflows that have run on the item in the past.
  • All the available workflows for that item.

Workflows page for an item

To view the Workflows page for an item, click the item in the list, and then clickWorkflows on the menu.

NOTE   The Workflows command is available only when the item is in a list or library that has at least one workflow attached to it.

When a user starts a workflow on an item, Windows SharePoint Services 3.0 adds a new column to that item. By default, the column name matches the name of the workflow. This read-only column displays the current status of the item within that workflow. This status column is added automatically for each workflow the first time it is run.

Columns display workflow status

In each column, the workflow status is a link. When you click In Progress, for example, you see the Workflow Status page for that instance of the workflow.

Workflow status page

A workflow created in Office SharePoint Designer 2007 cannot be deployed to multiple lists. It is only valid for the list for which it was created. However, multiple workflows can be attached to one list and may be available for a given item. Multiple workflows can run simultaneously on the same list item, but only one instance of a specific workflow can run on a specific item at any given time. For example, you might have two workflows, Workflow A and Workflow B, available for a specific list. Although both workflows can run simultaneously on a specific item in the list, you cannot have two instances of Workflow A or Workflow B running on the same item at the same time.

Introduction to customizing pages by using Web Parts

WSS list is so useful for business user, can do something simple system by the simple list and filter :D. i am start thinking should i be business personnel rather then SharePoint engineer? ha ha ha , ok, just keep tract this article from Microsoft , i am sure one day i will consult user to user this :D

 

 

This article is intended for Web page owners and administrators. It provides an overview of Web Parts and Web Part Pages and explains how you can customize a page by adding, changing, or deleting Web Parts.

Overview of Web Parts and Web Part Pages

A Web Part is a modular unit of information that forms the basic building block of a Web Part Page. You can add Web Parts to Web Part zones in a Web Part Page and then customize the individual Web Parts to create a unique page for your site users.

The following example uses the Image Web Part to describe the basic features of a Web Part.


Sample Image Web Part

Callout 1 The Web Part title bar contains the heading for the Web Part.

Callout 2 The Web Part menu contains functions that enable you to minimize or close the Web Part, edit the Web Part, or get Help for a specific Web Part. When the page is in edit mode, you can also use this menu to delete the Web Part or connect it to other Web Parts, depending on the type of Web Part that you are using.

Callout 3 The body of the Web Part contains the content that you specified for the type of Web Part that is being used. In this example, the Web Part is an Image Web Part, which displays an image.


A Web Part Page is a special type of Web page in which you can use Web Parts to consolidate data, such as lists and charts, and Web content, such as text and images, into a dynamic information portal that is built around a common task or special interest.

Your site home page is one example of a Web Part Page. When you create a new site or workspace site, you are creating a Web Part Page. You can also create a Web Part Page by selecting one of the available site templates, or you can use a Web design program that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007, to create a Web Part Page from scratch.

You can use a Web Part Page to present a variety of structured and unstructured information in an organized, useful, and convenient way. Web Part Pages often contain several Web Parts that are connected so that you can dynamically display data and content to see the results that you want.

For example, you can create a Web Part Page called Customer Orders that you frequently use to display critical information. You get a call from a customer who has a question about an order, does not remember the order ID number, but does remember the date when the order was placed. You can use a Web Part Page to do the following.


Customer Orders Web Part Page with several Web Parts

Callout 1 Look up an order by order ID number or, in this case, the order date.

Callout 2 Display all orders by date.

Callout 3 Select the correct order, based on the customer's name, and look up the order details as well as the customer details.

Callout 4 Select a line item in the order (in this case, the lamp), and display a product picture to confirm the customer's question.

Callout 5 Scan for late-breaking business news that is pertinent to the customer's order.


WEB PART PROPERTIES

Each Web Part shares a set of common properties (also called base class properties) that are organized into sections in the tool pane and that control the Web Part's appearance (such as the title, height, and width), layout (such as the Web Part order in the zone and the direction of the content), and advanced characteristics (such as the image icon and description).

Many Web Parts also have custom properties that are unique to the Web Part. These are usually displayed either above or below the common Web Part properties in the tool pane. For example, the Image Web Part has additional custom properties, including the image link, its horizontal and vertical alignment, and background color.

NOTE   Depending on how the Web Part was created, a Web Part custom property may be displayed in a default Miscellaneous section below the common properties in the tool pane.

WEB PART VIEWS

You can customize a Web Part in one of two views:

  • Shared view    You can add a Web Part to a Web Part Page and then edit the Web Part Page in a shared view. Shared Web Parts are available to all users of a Web Part Page who have the appropriate permission.
  • Personal view    You can add a shared Web Part to your own personal view and then edit your view of the Web Part. The changes that you make to a Web Part while you are in a personal view are available only to you. Other users who did not make changes in a personal view continue to see the shared view of the Web Part.

The view of the Web Part that you are working with can be important because:

  • You may have permission to edit only some Web Parts on certain Web Part Pages but not on other Web Part Pages.
  • You may be able to connect to certain Web Parts on a Web Part Page but not to other Web Parts on the same Web Part Page.
WEB PARTS AND WEB PART CONNECTIONS

An additional feature of Web Parts is the ability to easily connect them by passing data between them and synchronizing their behavior. By connecting Web Parts, you can manage data in dynamic and interesting ways. In many products and technologies, the task of connecting sets of data from different data sources is not easy and often requires programming skill. But with Web Parts, making data connections is as simple as using menu commands. By connecting Web Parts, you can, for example, present data from two Web Parts in alternate views, perform related calculations between two Web Parts, and filter a Web Part by using values from another Web Part — all on one Web Part Page.

WEB PART ZONES AND THEIR PROPERTIES

Web Part zones are containers of Web Parts that are used to group and organize Web Parts on a Web Part Page. Web Part zones also have a set of properties that serve a dual purpose. You can use one subset of properties to organize the layout and format of Web Parts on the Web Part Page. You can use another subset of properties to provide an additional level of protection from modification (or "lock down") of the Web Parts within the zone.

The Web Part zone properties each have default settings or behaviors. As you add Web Parts to the Web Part Page, some of these property values are automatically set. These property values are not designed to be edited in the browser, but you can edit them by using a Web design program that is compatible with Windows SharePoint Services, such as Office SharePoint Designer 2007.

For more information about Web Part zone properties, see the Windows SharePoint Services 3.0 SDK, which is available from the Windows SharePoint Services Developer Center on MSDN.

Top of Page TOP OF PAGE

Types of Web Parts

Windows SharePoint Services provides several Web Parts that are ready to use with your site. You can use these built-in Web Parts, customize them to suit your needs, or create new Web Parts and upload them for use throughout your site.

DEFAULT WEB PARTS

The following Web Parts are included by default in any site and can be customized to suit the needs of your team. Many of these Web Parts can also be connected to each other to create a variety of unique solutions:

  • Content Editor Web Part    You can use the Content Editor Web Part to add formatted text, tables, hyperlinks, and images to a Web Part Page.
  • Form Web Part    You can use the Form Web Part to connect to and filter a column of data in another Web Part. Both Web Parts must run on the same server.
  • Image Web Part    You can use the Image Web Part to add a picture or graphic to a Web Part Page. To more easily coordinate the image with other Web Parts on the page, you can control the vertical alignment, horizontal alignment, and background color of the image inside the Image Web Part by editing its custom properties in a shared view.
  • List View Web Part    You can use the List View Web Part to display and edit list or library data on your site and to connect to other Web Parts, including other List View Web Parts. Lists are information that you share with team members and often display in tabular format. List views display this information in different ways for different purposes, such as filtering, sorting, or selecting specific columns.

NOTE   There is no Web Part called List View. When you create a list on your site, a List View Web Part is automatically created and named after the list. For example, if you create a list called Boats, a Web Part called Boats will be available in the Site Name gallery. The Web Part automatically displays the data contained in the list that you created.

  • Page Viewer Web Part    You can use the Page Viewer Web Part to display a Web page, file, or folder on a Web Part Page. You enter a hyperlink, file path, or folder name to link to the content.
  • Site Users Web Part    You can use the Site Users Web Part to display a list of users and groups who have permission to use a site. The Site Users Web Part automatically appears on the home page of a Document Workspace site. You can also add the Site Users Web Part to any Web Part Page.

NOTE   In sites that are running on Microsoft Windows SharePoint Services 2.0 and earlier, the Site Users Web Part was called the Members Web Part.

  • XML Web Part    You can use the XML Web Part to display Extensible Markup Language (XML) and apply Extensible Stylesheet Language Transformations (XSLT) to the XML before the content is displayed. For example, you might have an XML file that contains a list of boats, prices, and links to images of the boats. You can use the XSLT to transform the data to display a list of boats and prices and make the boat name a hyperlink to display the image in a separate window.
PRECONFIGURED LIST VIEW WEB PARTS

The following Web Parts are built into the Windows SharePoint Services team site template and are automatically configured and ready to use on a Web Part Page when you create a new team site. Different combinations of these Web Parts are included when you create a team site or workspace site, depending on which site template you select.

NOTE   These Web Parts are derived from the List View Web Part and use preconfigured Web Part templates to create their unique layout and design. To add data to these lists, on the Quick Launch, click View All Site Content, and then clickLists. On the All Site Content page, click the name of the list for which you want to add data.

  • Announcements    Use the Announcements Web Part to post news, status, and other short bits of information that you want to share with team members.
  • Calendar    Use the Calendar Web Part to display upcoming events or team schedules.
  • Links    Use the Links Web Part to post hyperlinks to Web pages that interest your team.
  • Shared Documents    Use the Shared Documents Web Part to share files from the default document library with site users.
  • Tasks    Use the Tasks Web Part to assign a task to a member of your team, specify its due date and priority, and indicate its status and progress.
  • Team Discussion    Use the Team Discussion Web Part to provide a forum for talking about topics that interest your team.
CUSTOM WEB PARTS

By using a programming environment that is compatible with Windows SharePoint Services, such as Microsoft Visual Studio, developers can exploit the full feature set of Microsoft ASP.NET to create custom Web Parts. A Web Part Page is an ASP.NET file (.aspx), and Web Parts are derived from Web Form Controls. To further enhance Web Part Pages, developers can create their own Web Parts that provide new functionality. Developers can also add custom properties to the Web Parts, add custom builders in the tool pane for specialized user interfaces, and connect to other Web Parts by using Web Part connections. For more information about creating and deploying Web Parts, see the Windows SharePoint Services 3.0 SDK, which is available from the Windows SharePoint Services Developer Center on MSDN.

You can also use Web Parts that other people or companies have created. You must have appropriate permissions to add a third-party Web Part to your Web Part Page or site. Some Web Parts may need to be deployed directly to the server. If you are unable to add a third-party Web Part to your Web Part Page or site, contact your administrator for assistance.

Top of Page TOP OF PAGE

Ways to use Web Parts and Web Part Pages

You can use Web Part Pages in the following ways:

  • Consolidate data from different data sources.
  • Report and summarize critical data.
  • Analyze and aggregate data (for example, sums, totals, or counts).
  • Summarize key information that you want to see at the beginning of each day.
  • Prioritize and highlight project or customer data to help you make effective decisions.
  • Display an up-to-date work schedule and meeting information to quickly plan your day.
  • Get quick access to business news, local weather, and your favorite Web sites to focus your Web browsing.
WAYS TO CREATE AND CUSTOMIZE A WEB PART PAGE

There are several ways to create and customize a Web Part Page:

  • The New Web Part Page form    The most common way to create a Web Part Page is through the New Web Part Page form. On the Site Actionsmenu Site Actions menu, click Create, and then click Web Part Page to open the New Web Part Page form. After using this form to create a page, you can begin designing the page right away in the browser. When you want to browse through the page, just close the tool pane.
  • A Web design program    By using a Web design program that is compatible with Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007, you can make advanced customizations to a Web Part Page, including the following:
    • Customize the theme of a Web Part Page that uses the site theme by default.
    • Edit a Web Part Page template or create a new one.
    • Customize the page layout.
    • Edit zone properties.
    • Add HTML code or Web controls.
    • Change the way Web Parts are ordered inside a zone.
    • Add Web Parts outside a zone, or add a Web Part to a Web page that is not a Web Part Page.
    • Create connections between Web Parts on different Web Part Pages.
    • Publish a Web Part Page to a Web site that is running Windows SharePoint Services.
    • Customize the Form Web Part and use the Data View Web Part.

Top of Page TOP OF PAGE

Web browser support for Web Part Pages

Web browser support for Web Part Pages can be categorized into two levels:

  • Level 1 support is the highest level of visual and functional support. Browsers that provide level 1 support include recent versions of Microsoft Internet Explorer for Microsoft Windows.
  • At level 2 support, a few visual and functional features are not available to some browsers, and some other features are compromised and behave differently from the way they behave in level 1 browsers. However, the majority of features are still available to users. Browsers that provide level 2 support include Firefox 1.5 and later for Windows and Netscape Navigator 8.0 and later for Windows. Level 2 browsers are not supported for Windows SharePoint Services 3.0 Central Administration.

NOTE   Level 2 browsers do not support the creation of connections between Web Parts.

Tuesday, January 18, 2011

A way to determine the size of subsites?

There's a tool on Codeplex that will give you this information: http://www.codeplex.com/SPUsedSpaceInfo .


Bob Klass also has a tip in his blog of another way to try to get that info:http://bobklass.blogspot.com/2009/01/easy-way-how-to-find-sharepoint-subsite.html .

Easy Way How to Find SharePoint Subsite Size

I was looking for a GOOD way to find out the size of subsites. It seems a lot of people are struggling with this. You could try SharePoint Designer. That's fun. When you ask it site properties, it will give you a different answer depending on what document libraries or lists you touched. Obviously that is not going to be reliable.

I'll cut to the chase (although I was trying to be as wordy as possible). This isn't a GOOD way, but it is a very simple way:

  • open the site in Windows Explorer
  • navigate to the root of the site or subsite in question
  • right click, properties

That may be a little resource intensive - it takes a while to open. I think it may have to open a lot more than it appears just to get you that number, but there it is in the properties window. Piece of cake.

 

Post Script: http://www.codeplex.com/SPUsedSpaceInfo is a console app to get a CSV listing of sites and their size. Beware that the setup is pretty heavy handed - a Dotnet 3.5 SP1 installation starts right up if you aren't there already.

 

 

If you only have a couple of sites you want to take a look at and don't want to install a tool, you might try it. I would caution you to take his approach with a grain of salt, I am a lot more confident in the accuracy of a solution that uses the SharePoint object model to retrieve this information than his "hack" through the Windows Explorer GUI. I just would expect the object model to be able to present a much more true picture of how much storage a site is using than the UI would.

Tuesday, January 11, 2011

Some queries with Share[point content DB

Some queries with these tables:

-- Query to get all the top level site collections

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURL, Title, Author, TimeCreated FROM dbo.Webs WHERE (ParentWebId IS NULL)

 

-- Query to get all the child sites in a site collection

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURl, Title, Author, TimeCreated FROM dbo.Webs WHERE (NOT (ParentWebId IS NULL))

 

-- Query to get all the SharePoint groups in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.Groups.ID AS Expr1, dbo.Groups.Title AS Expr2, dbo.Groups.Description FROM dbo.Groups INNER JOIN dbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId

 

-- Query to get all the users in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.UserInfo.tp_ID, dbo.UserInfo.tp_DomainGroup, dbo.UserInfo.tp_SiteAdmin, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Email FROM dbo.UserInfo INNER JOIN dbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId

 

-- Query to get all the members of the SharePoint Groups

SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.GroupMembership INNER JOIN dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOINdbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID

 

-- Query to get all the sites where a specific feature is activated

SELECT dbo.Webs.Id AS WebGuid, dbo.Webs.Title AS WebTitle, dbo.Webs.FullUrl AS WebUrl, dbo.Features.FeatureId, dbo.Features.TimeActivatedFROM dbo.Features INNER JOIN dbo.Webs ON dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.Id WHERE (dbo.Features.FeatureId = '00AFDA71-D2CE-42fg-9C63-A44004CE0104')

 

-- Query to get all the users assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.RoleAssignment INNER JOIN dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN dbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID

 

-- Query to get all the SharePoint groups assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.Groups.Title AS GroupName FROM dbo.RoleAssignment INNER JOINdbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN dbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND dbo.RoleAssignment.PrincipalId = dbo.Groups.ID

 

You can also find interesting to read Different Database created with SharePoint

 

Copy From http://manish-sharepoint.blogspot.com/2008/06/some-important-tables-with-sharepoint.html

Monday, January 10, 2011

How to deal with orphaned SharePoint sites

Copy from http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=299

 

“in my case do all the step below cannot resolved , once do the step detach and attach db problem resolved” > keep track the nice step from

Cornelius J. van Dyk

 

Whatever causes it, orphaned sites in SharePoint can be a very painful issue to deal with.  One way in which an orphaned site can occur is when a STSADM command it terminated during execution because of a drop of your remote desktop connection.

If you are working with STSADM, be sure to configure your Remote Desktop settings in order to keep disconnected sessions alive.  Failure to do so, WILL cause problems for you in the future.

The toughest orphaned site I've ever had to deal with occurred during such a case.  The site was being restored from a STSADM backup.  The server's Remote Desktop settings were not set to keep the session alive and when a blip in the wireless network cause the connection to be broken, Windows simply killed the session causing the site collection to become orphaned.  This was evident when the restore command was re-attempted:

stsadm -o restore -url http://server/site -filename site.stsadm.bak -overwrite

Which returned this puzzling message:

Another site already exists at http://server/site. Delete this site before attempting to create a new site with the same URL, choose a new URL, or create a new inclusion at the path you originally specified.

This is a puzzling message because... didn't we specify the "-overwrite" switch?  Why yes we did!  So what is going on here?
OK, OK.  So the site is there and the "-overwrite" switch isn't working.  Let's just delete the site.  The following command is issued:

stsadm -o deletesite -url http://server/site

Only thing is, the site collection delete statement failed with the following error:

The system cannot find the path specified. (Exception from HRESULT: 0x80070003)

No problem you say.  Just use the -force switch with the deletesite command.  Doing that, the following command is issued:

stsadm -o deletesite -force -siteid 2a9fbc10-4a60-427b-8e6e-e1565d7e5796 -databaseserver sql -databasename Site_Content

Unfortunately, the response is not what you expected.  This is the error returned:

Database "Site_Content" is not associated with this Web application

Of course, the message would make sense if the database was not associated with the web application, but it was.  It is time for the good old orphan identification and handling swich... databaserepair
We begin by identifying the orphaned content.  We issue the following command:

stsadm -o databaserepair -url http://server/site -databasename Site_Content

As expected, the command dumps a bunch of orphaned content.  Time to delete the corrupted content so we can restore the site again.  Simply add the -deletecorruption switch thus:

stsadm -o databaserepair -url http://server/site -databasename Site_Content -deletecorruption

Once the corrupted content has been deleted, rerunning the command without the -deletecorruption switch yields a clean bill of health for our database thus:

<OrphanedObjects Count="0" />

Unfortunately, retrying the restore still fails by with the same "site exists" error.  This is where I had the idea to detach and re-attach the database to try and clear up the issue.  Two quick STSADM commands later thus:

stsadm -o deletecontentdb -url http://server/site -databasename Site_Content

and

stsadm -o addcontentdb -url http://server/site -databasename Site_Content

yielded:

Operation completed successfully.

Now retrying the restore thus:

stsadm -o restore -url http://server/site -filename site.stsadm.bak -overwrite

finally yielded the result we were looking for:

Operation completed successfully.

Hopefully this will help you get sticky orphaned sites handled quickly so you can move on to more important things!

Later
C

Tuesday, December 14, 2010

querying membership data

Found one very usefull query from internet :

http://johnlivingstontech.blogspot.com/2009/11/sharepoint-2007-five-very-helpful-yet.html

thanks for the creator to share this!!  Below is the SQL query

1. Select Groups By URL

USE [WSS_Content]

CREATE PROCEDURE [dbo].[usp_SelectGroupsByUrl]

@url NVARCHAR(255)

AS

BEGIN

SELECT Groups.ID AS "GroupID", Groups.Title AS "GroupTitle", Webs.Title AS WebTitle, Webs.FullURL AS WebURL, Roles.Title AS "RoleTitle"

FROM RoleAssignment WITH (NOLOCK)

INNER JOIN Roles WITH (NOLOCK) ON Roles.SiteId = RoleAssignment.SiteId

AND Roles.RoleId = RoleAssignment.RoleId

INNER JOIN Groups WITH (NOLOCK) ON Groups.SiteId = RoleAssignment.SiteId

AND Groups.ID = RoleAssignment.PrincipalId

INNER JOIN Sites WITH (NOLOCK) ON Sites.Id = RoleAssignment.SiteId

INNER JOIN Perms WITH (NOLOCK) ON Perms.SiteId = RoleAssignment.SiteId

AND Perms.ScopeId = RoleAssignment.ScopeId

INNER JOIN Webs WITH (NOLOCK) ON Webs.Id = Perms.WebId

WHERE ((Webs.FullUrl = @url) OR (@url IS NULL))

ORDER BY

Groups.Title, Webs.Title, Perms.ScopeUrl

END

Sample Query

EXEC usp_SelectGroupsByUrl 'Sites/HR/Pay'

Results

GroupID

GroupTitle

WebTitle

WebURL

RoleTitle

71

Manager

Accounting

Sites/HR/PAY

View Only

74

Acct Sr Manager

Accounting

Sites/HR/PAY

Full Control

75

Member

Accounting

Sites/HR/PAY

View Only

76

Viewer

Accounting

Sites/HR/PAY

View Only

 

 

 

2. Select Groups By URL and User

USE [WSS_Content]

CREATE PROCEDURE [dbo].[usp_SelectGroupsByUrlUser]

@login NVARCHAR(255),

@url NVARCHAR(255)

AS

BEGIN

SELECT G.ID AS "GroupID", G.Title AS "GroupTitle", W.Title AS WebTitle, W.FullURL AS WebURL, R.Title AS "RoleTitle"

FROM RoleAssignment AS RA WITH (NOLOCK)

INNER JOIN Roles AS R WITH (NOLOCK) ON R.SiteId = RA.SiteId

AND R.RoleId = RA.RoleId

INNER JOIN Groups AS G WITH (NOLOCK) ON G.SiteId = RA.SiteId

AND G.ID = RA.PrincipalId

INNER JOIN Sites AS S WITH (NOLOCK) ON S.Id = RA.SiteId

INNER JOIN Perms AS P WITH (NOLOCK) ON P.SiteId = RA.SiteId

AND P.ScopeId = RA.ScopeId

INNER JOIN Webs AS W WITH (NOLOCK) ON W.Id = P.WebId

WHERE ((W.FullUrl = @url) OR (@url IS NULL))

AND G.ID IN

(

SELECT Groups.ID FROM GroupMemberShip WITH (NOLOCK)

INNER JOIN Groups ON GroupMembership.GroupID = Groups.ID

INNER JOIN UserInfo ON GroupMembership.MemberID = UserInfo.tp_ID

WHERE ((tp_Login = @login) OR (@login IS NULL))

)

ORDER BY

G.Title, W.Title, P.ScopeUrl

END

Sample Query

EXEC usp_SelectGroupsByUrlUser 'acmedomain\jdoe', 'Sites/HR/Pay'

Results

GroupID

GroupTitle

WebTitle

WebURL

RoleTitle

74

Sr Manager

Accounting

Sites/HR/PAY

Full Control

 

 

 

3. Select Groups By User Login

USE [WSS_Content]

CREATE PROCEDURE [dbo].[usp_SelectGroupsByUserLogin]

@login NVARCHAR(255)

AS

BEGIN

SELECT DISTINCT Groups.ID AS "GroupID", Groups.Title AS "GroupTitle"

FROM GroupMemberShip WITH (NOLOCK)

INNER JOIN Groups WITH (NOLOCK) ON GroupMembership.GroupID = Groups.ID

INNER JOIN UserInfo WITH (NOLOCK) ON GroupMembership.MemberID = UserInfo.tp_ID

WHERE ((tp_Login = @login) OR (@login IS NULL))

ORDER BY Groups.Title

END

Sample Query

EXEC usp_SelectGroupsByUserLogin 'acmedomain\jdoe'

Results

GroupID

GroupTitle

74

Sr Manager

52

Corporate Viewer

14

HR Team Member

4. Select Users By Group

USE [WSS_Content]

CREATE PROCEDURE [dbo].[usp_SelectUsersByGroup]

@groupTitle NVARCHAR(255)

AS

BEGIN

SELECT dbo.UserInfo.tp_ID AS UserID, dbo.UserInfo.tp_Title AS UserTitle, dbo.UserInfo.tp_Login AS UserLogin, dbo.UserInfo.tp_Email AS UserEmail, dbo.Groups.ID AS GroupsID, dbo.Groups.Title AS GroupsTitle

FROM UserInfo WITH (NOLOCK)

INNER JOIN GroupMembership WITH (NOLOCK) ON UserInfo.tp_ID = GroupMembership.MemberID

INNER JOIN Groups WITH (NOLOCK) ON GroupMembership.GroupID = Groups.ID

WHERE ((dbo.Groups.Title = @groupTitle) OR (@groupTitle IS NULL))

ORDER by dbo.UserInfo.tp_Login

END

Sample Query

EXEC usp_SelectUsersByGroup 'HR Team Member'

Results

UserID

UserTitle

UserLogin

UserEmail

GroupsID

GroupsTitle

23

Doe, John

acmedomain\jdoe

jdoe@acmedomain.com

14

HR Team Member

20

Doe, Jane

acmedomain\jadoe

jadoe@acmedomain.com

14

HR Team Member

2

Smith, Bob

acmedomain\bsmith

bsmith@acmedomain.com

14

HR Team Member

24

Yamamoto, Kazue

acmedomain\kyamamoto

kyamamoto@acmedomain.com

14

HR Team Member

46

Nakamura, Ichiro

acmedomain\inakamura

inakamura@acmedomain.com

14

HR Team Member

5 Select Users By Groups

USE [WSS_Content]

CREATE PROCEDURE [dbo].[usp_SelectUsersByGroups]

@groupTitles VARCHAR(1000)

AS

BEGIN

DECLARE @idoc INT

EXEC sp_xml_preparedocument @idoc OUTPUT, @groupTitles

SELECT dbo.UserInfo.tp_ID AS UserID, dbo.UserInfo.tp_Title AS UserTitle, dbo.UserInfo.tp_Login AS UserLogin, dbo.UserInfo.tp_Email AS UserEmail, Groups.Title AS GroupTitle

FROM UserInfo WITH (NOLOCK)

INNER JOIN GroupMembership WITH (NOLOCK) ON UserInfo.tp_ID = GroupMembership.MemberID

INNER JOIN Groups WITH (NOLOCK) ON GroupMembership.GroupID = Groups.ID

JOIN OPENXML(@idoc, '/Root/Group', 0) WITH (Name VARCHAR(100)) AS g

ON dbo.Groups.Title = g.Name

ORDER by dbo.Groups.Title, dbo.UserInfo.tp_Title

END

Sample Query

EXEC usp_SelectUsersByGroups '<Root><Group Name="HR Team Member"></Group><Group Name="Acct Sr Managers"></Group></Root>'

Results

UserID

UserTitle

UserLogin

UserEmail

GroupsID

GroupsTitle

23

Doe, John

acmedomain\jdoe

jdoe@acmedomain.com

14

HR Team Member

20

Doe, Jane

acmedomain\jadoe

jadoe@acmedomain.com

14

HR Team Member

2

Smith, Bob

acmedomain\bsmith

bsmith@acmedomain.com

14

HR Team Member

24

Yamamoto, Kazue

acmedomain\kyamamoto

kyamamoto@acmedomain.com

14

HR Team Member

46

Nakamura, Ichiro

acmedomain\inakamura

inakamura@acmedomain.com

14

HR Team Member

7

Horowitz, Rick

acmedomain\rhorowitz

rhorowitz@acmedomain.com

15

Acct Sr Managers

3

Davis, Jiro

acmedomain\jdavis

jdavis@acmedomain.com

15

Acct Sr Managers

user's list of web sites in SharePoint : SharePoint

SELECT DISTINCT w.Title, r.WebId, r.Title AS accessLevel, ui.tp_Login,
ui.tp_DomainGroup, ui.tp_Title, w.FullUrl, w.AlternateCSSUrl,
p.ScopeUrl
FROM RoleAssignment AS ra INNER JOIN
Roles AS r ON r.SiteId = ra.SiteId AND r.RoleId
= ra.RoleId INNER JOIN
UserInfo AS ui ON ui.tp_SiteID = ra.SiteId AND
ui.tp_ID = ra.PrincipalId INNER JOIN
Sites AS s ON s.Id = ra.SiteId INNER JOIN
Perms AS p ON p.SiteId = ra.SiteId AND p.ScopeId
= ra.ScopeId INNER JOIN
Webs AS w ON w.Id = p.WebId

 

copy from Forum

Discovering all workflows in SharePoint farm

I got a question from user to identify all workflow in my Sharepoint environment. I tried to identify some out of box option but could not find one. After that I have to put my DB cap on and write query on backend content database of MOSS farm to get list all sites and sub containers which are having active workflow running in them. Here is the query :


select distinct(w.fullurl) as SiteName, L.tp_Title as ListName from webs w,workflow wf , Alllists L where w.id=wf.webid and w.siteId=wf.siteId and wf.listId=L.tp_Id

 

Copy from Here

Tuesday, October 19, 2010

-- Query to get all the SharePoint groups in a site collection

 

Another cool query from sharepointkings

 

Customer request the report on all the user in the group on the specify sites collection.

 

-- Query to get all the SharePoint groups in a site collection
SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.Groups.ID AS Expr1,
dbo.Groups.Title AS Expr2, dbo.Groups.Description
FROM dbo.Groups INNER JOIN
dbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId

 

-- Query to get all the members of the SharePoint Groups
SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login
FROM dbo.GroupMembership INNER JOIN
dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOIN
dbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID

 

 

after query the all the memeber of the group, use excel to remove the duplicate data then you will know how many user in the group :)

Unable to reorder content type

Have user copy the list template from another site and want to reorder the content type, when click on the column order at the content type you will see the error :

 

Object reference not set to an instance of an object.   at Microsoft.SharePoint.ApplicationPages.ChangeFieldOrderPage.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Work around:

you will not be able to manage the order of your columns on the list settings page again until you switch “Allow management of content types” back to No. When the management of content types if enabled, you can then reorder the columns for each specific content type. You may or may not want this to be your standard setup, so my best practice here would be to turn this feature back off when you are finished managing the content type.

 

Detail step:

 

1. change the list setting at Advanced settings and change the Allow management of content types to no. > click ok

2. under the column, you will see Column ordering. Click on the column ordering and change the order.> click ok when you done

3. change the list setting at Advanced settings and change the Allow management of content types to yes > click ok

 

guessing of the root cause:

 

i think because the content type is attach to the template and no content type created for the sites. once you click on ordering, then will go to search the content type gallery at site level. once cannot found it and error message will show at above. i guess is consider bug :)

Thursday, October 14, 2010

Default Recovery Models for MOSS2007 Databases

Today attend SQL2008 training is talking about what is the different Simple recovery model VS Full recovery Model.Then i am thinking what is the moss2007 setting? Below is the Default Recovery Model.

 

Simple model :

  • Automatic reclaims the transaction log
  • Allow only Full backups

Full Model:

  • Require transaction log backup (which mean not automatic to shrink your transaction log file)
  • able to enable recovery the data very near to down time

* oh ya…please remember all the Database here, because one of my interview is asking about this :) . ha ha..

image

Monday, September 13, 2010

Set searchadcustomquery back to OOB setting

how do you reset the searchadcustomquery to oob setting? which is <Property Exist = “No”> , normally used stsadm the value will showed as <Property Exit=”Yes”, Value=””>”.

 

to set the value back to <Property Exist = “No”>  , we can use simple coding as below to reset it.

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

 

namespace reset_customQuery
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite(@"http://abc.com"))
            {
                SPWebApplication apps = site.WebApplication;
                //reset to null
                apps.PeoplePickerSettings.ActiveDirectoryCustomQuery = null;
                 apps.Update();

                Console.WriteLine("Done");
            }
        }
    }
}

 

to checking your value you can use the stsadm below:

 

stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-activedirectorysearchtimeout
stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-distributionlistsearchdomains
stsadm -o getproperty -url "http://abc.com" -pn peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode
stsadm -o getproperty -url "http://abc.dhl.com" -pn peoplepicker-onlysearchwithinsitecollection
stsadm -o getproperty -url "http://abc.dhl.com" -pn peoplepicker-searchadcustomquery