ĐÀO TẠO DOANH NGHIỆP : SỞ KHOA HỌC CÔNG NGHỆ TỈNH ĐỒNG NAI

ENTERPRISE TRAINING: DONG NAI DEPARTMENT OF SCIENCE AND TECHNOLOGY.

HÌNH ẢNH TẬP HUẤN LỚP SHAREPOINT WORKFLOW VÀ KIẾN TRÚC SHAREPOINT

PHOTOS OF SHAREPOINT WORKFLOW AND ARCHITECTURE CLASS.

HÌNH ẢNH TẬP HUẤN LỚP SHAREPOINT WORKFLOW VÀ KIẾN TRÚC SHAREPOINT

PHOTOS OF SHAREPOINT WORKFLOW AND ARCHITECTURE CLASS.

Showing posts with label New Features Sharepoint 2010. Show all posts
Showing posts with label New Features Sharepoint 2010. Show all posts

Friday, October 6, 2017

sharepoint 2010 Quick Parts Word

How to pull SharePoint 2010 document properties into Word (Quick Parts)

We use Shared Document library for this example, Create 2 columns is DisplayName and Province link below image

 Creating new word document with any content then save to template

 Go back to Shared Document library setting >> Advanced settings

 Click to Yes
 Click on "Document" content type
 Click to Advanced settings

 Upload your template here


 Edit your template
Insert you content here then click to add Quick Parts

Choose Document property >> Display name

Doing the same with Province property

Save then close word

Click to OK

Go back Shared Documents >> New Document

Input some content then save
 Save to your location

Upload your document which it was created before

Here is document was uploaded with properties

Open document and you can see the document properties is mapped to ...


 Note: 
When you create the new properties and you want to map it to Quick Parts, do the same step "Edit your template" and map the new document properties to new Quick Parts then Save it. But remember that: you must create the new document to apply the new Quick Parts. If you edit the old document with new properties, you will not see the change.

Thursday, April 26, 2012

SharePoint 2010 Ratings


Open your list (Custom List, Lirary …) | Settings
Click to Ratinng settings
Choose yes
Done rating

Thursday, March 22, 2012

How to Validation Column In Sharepoint 2010


How to Validation Coumn in sharepoint 2010
Create new Custom List LeaveForm
Create a new column StartDate (Date and Time)
Create a new column EndDate (Date and Time)
Go to List Setting | Validation settings
Set Formula as follows
Error when StartDate > EndDate as follows:

Monday, March 5, 2012

Part 1: Attach file to Web Part using module feature


Step 1: Open visual studio 2010 | New | Project | Empty Sharepoint Project , project name is: ApplyCssUseModuleFeartureSanbox
Step 2: Choose deploy sanbox solution
Step 3: Add new Item
Step 4: Choose Module, name is CallFileCssOrScript
Step 5: View UI below
Step 6: Rename Sample.txt file to Sample.css
Step 7: Copy  code  Url="_catalogs/masterpage" RootWebOnly="TRUE" List="116" and paste to here
Step 8: Delete Url  CallFileCssOrScript\ 
Step 9: Copy  Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" and paste to here
Step 10: Open file Sample.css and delete content
Step 11: Paste code below to content of file Sample.css
.tableRow
{
    background-color:Orange;
    color:Red;
}
Step 12: Add new Item | Web Part | name is ApplyCssUseModuleFeartureSanbox
Step 13: Write code  CreateChildControls
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace ApplyCssUseModuleFeartureSanbox.ApplyCssUseModuleFeartureSanbox
{
    [ToolboxItemAttribute(false)]
    public class ApplyCssUseModuleFeartureSanbox : WebPart
    {
        protected override void CreateChildControls()
        {
            //Create new table object
            Table table = new Table();
            table.GridLines = GridLines.Both;
            //The first row
            TableRow tableRow = new TableRow();
            tableRow.CssClass = "tableRow";//Call css from module
            TableCell tableCell = new TableCell();
            tableCell.Text = "Your name";
            tableRow.Cells.Add(tableCell);
            tableCell = new TableCell();
            tableCell.Text = "Email";
            tableRow.Cells.Add(tableCell);
            tableCell = new TableCell();
            tableCell.Text = "Phone number";
            tableRow.Cells.Add(tableCell);
            table.Rows.Add(tableRow);
            //The second row
            tableRow = new TableRow();
            tableCell = new TableCell();
            tableCell.Text = "Do Quoc Hung";
            tableRow.Cells.Add(tableCell);
            tableCell = new TableCell();
            tableCell.Text = "quochung211187@gmail.com";
            tableRow.Cells.Add(tableCell);
            tableCell = new TableCell();
            tableCell.Text = "0909263861";
            tableRow.Cells.Add(tableCell);
            table.Rows.Add(tableRow);
            this.Controls.Add(table);
        }
    }
}
Step 14: before build, you test file: don’t appear file in Folder Debug ?
Step 15: Build Project
Step 16: After Build, you see appear 2 file below
Step 17: Then Package Project
Step 18: Appear Error because path with length more 248 character (if error)
Step 19: Right click project | Properties | Edit Assembly name and Default namespace
Step 20: Edit to ApplyCss for Assembly name and Default namespace
Step 21: Rebuild project
Step 22: Delete two old file below (if true)
Step 23: Package project
Step 24: Result, file .wsp created
Step 25: Open Site | Site Action | Site Setting 
Step 26: Click Solution link
Step 27: Click Icon Upload Solution
Step 28: Choose file .wsp in your  folder bin\debug
Step 29: Click Ok | click Icon Active
Step 30: Add Web Part – Click Site Action | Edit Page
Step 31: Click Tab Insert | choose Web Part
Step 32: in Categories Web Part | Choose Category  Custom | Choose your file .WSP and click Add
Step 33: Click tab Page | Click Icon Stop Editing
Step 34: Result below but css don’t Apply

Step 35: you can test file Sample.css when you register in Element.xml of Module below and result you see file is exist
Step 36: Reason css don’t apply because css do not register, you paste code below to your Web Part
      //Register to file css
      Literal literalCss = new Literal();
      this.Controls.Add(literalCss);
      literalCss.Text = "<link rel='stylesheet' type='text/css' href='/_catalogs/masterpage/Sample.css'/>";
Step 37: Rebuild project and build project and package project again, then Deactive WSP | choose you .wsp file and click icon Deactive
Step 38: Poupup appear, you click Deactive Icon
Step 39: Result below, Css is apply to table…