Qeb Archives: SharePoint

Yuav ua li cas rau troubleshoot mysterious SharePoint kom raug.

Txheej txheem cej luam:

Debugging yog yooj yim thaum tab tom xyaum functionality kev cai rau cov kev pab cuam SharePoint qhov rais 3.0 (WSS) los yog neeg rau zaub mov SharePoint Microsoft Office (NTXHUAB). Lub culprit lub ntsiab yog tias SharePoint txhua zaus chaw diagnostic heev me ntsis txog ntawm lub web browser thaum muaj tshwm sim ib qho kev ua yuam kev. No nkag teb chaws blog piav li cas los nrhiav qhov system-generated diagnostic ntxiv uas muaj feem ntau muab ntawd ntxiv me ntsis qhia tias ib tug yuav tsum tau thiaj li yuav paub hauv paus ua rau. Qhov no ces ua rau kev dlaws teeb meem.

Kuv tau siv cov txheej txheem no nrog poj zoo ntawv yuav kom daws tau mysterious txwv tsis pub kom raug.

Mus kom ze:

SharePoint yam ib yawm deal cov ntaub ntawv rau lub cav diagnostic hauv lub cav ntaub ntawv nyob rau hauv lub 12 nas muv.

Cov "12 tshees" feem ntau nyob ntawm "C yog:\Kev FilesCommon FilesMicrosoft SharedWeb neeg rau zaub mov Extensions12 ". (Kuv tsis paub tseeb tias tej zaum tus 12 nas muv mus nyob qhov twg lwm, qhov tseeb).

Tsab cai idea uas yog los nrhiav cov cav ntawv tam sim no, yuam kom cov yuam kev thiab ces ceev nrooj qhib cov ntaub ntawv ca. Cov cav cov ntaub ntawv yog thaum yus:

  • Nqi ntaub ntawv copious. SharePoint generates ib nqi diagnostic xwm loj heev thiab sau nws rau tej ntaub ntawv ntawd cav sai heev. Koj yuav tsum tau ceev nrog tus ntiv tes mus ntes nws.
  • Multiplicity. SharePoint tsis sau ntawv rau ib cov ntaub ntawv ca xwb tab sis theej generates ntau yam ntaub ntawv cav ua ib theem zuj zus.
  • Luam thiab nicely paste rau hauv MS Excel.

Hauv txoj kev kuv nyiam:

  1. Pem lub qhov rais explorer taw kom qhib lub 12 hivelogs.
  2. Txheeb tus saib qhia hloov Date (ua ntej tshaj plaws tsis ntev los no).
  3. Highlight ntawv cav no.
  4. Nyob rau hauv cov qhov web browser qhov rais, sib zog yuam cov kev tshwm sim thaum.
  5. Ceev nrooj qhib cav ntawv tam sim no thiab luam nws txheem rau MS Excel.
  6. Dhia mus kawg thiab tsom xam cov yam nkag.

Lwm yam kev sau ntawv:

Los vim, lub cav diagnostic yog nyob rau hauv lub 12 hiveLOGS directory.

MS Best txoj kev (as per Mike T. ntawm Microsoft) lub xeev uas lub cav ntaub ntawv yuav tsum tau rua ib zog dua lwm tsav. Ib qho li no ntawm central admin. Koj khiav dej num uas yuav tau ua li no, hauv which thaum koj yuav obviously tau nrhiav cav ntawv muaj siv rau lub neej ntawd 12 nas muv qhov chaw).

No nkag addresses txog tej teeb meem xws li:

  • SharePoint workflow tejyam uas pib ntawm ib sab hauv qhov kev ua yuam kev.
  • (tshaj qhov yuav muab ntxiv rau lub sij hawm)
  • Lawm no nkag tswv diagnosing workflow uas tsis (e.g. "Lub workflow tejyam uas pib ntawm ib qho yuam kev lawm sab hauv").

NTXHUAB: Taw qhia tau rau ib lub koom haum

(no nkag ntoo khaub lig tso tawm ntawm http://paulgalvin.spaces.live.com/blog/ thiab http://blogs.conchango.com)

Cov postings rau ntawm qhov chaw no yog kuv tus kheej thiab tsis tas sawv Conchango ntawv txaus qhia, cov tswv yim los yog tswvyim.

Txheej txheem cej luam:

No nkag piav tej ntaub ntawv keeb kwm yav dhau rau ib tug loj (3,000 cov neeg siv) Microsoft Office SharePoint Server (NTXHUAB) rollout thiab zoo li cas peb ho tau peb tes num dov tej tib hais tias tus neeg ntawd zoo siab thiab nrees mus ib txog kev uas xaus nrog lawv mus tu cov NTXHUAB feature teeb. Xws li cov ntaub ntawv ntawm lub qhov rooj, peb muaj kwv yees li 50% sau nrog tus thawj theem ntawm qhov kev tsim. Raws li tej yam kev kawm, Kuv mam li hloov no nkag teb chaws thiab sau tshiab nkag.

Nyob rau hauv cov ntaub ntawv no kev, lub tuam txhab muaj twb ntsia neeg rau zaub mov Portal SharePoint 2003. Cov pab pawg neeg uas tsis yog nws ntsia qhov khoom ntawm ib tug tsi "peb pom tias tus neeg zov" zam. Nws tau sai heev txais yuav los ntawm ntau cov neeg ua hauj lwm thiab pib nrov heev nyob rau hauv lub loj at enterprise. Thaum uas koj yuav xav txog tej yam, qhov no twb tsis tau zoo rollout zoo (uas tus neeg nkag admits) thiab thaum NTXHUAB tuaj txog rau ntawm lub scene, tus neeg zoo lawm "ua nws txoj" thiab ntiav peb pab lawv.

Yog ib cov lus nug central txojkev peb thaum peb pib siv lub qhov project no yog: Li ua peb nste NTXHUAB rau cov neeg no? Tau tias tus neeg twb muaj kev paub SharePoint, peb wondered — peb puas ua "plawg" txoj kev kawm los ua peb pib los ntawm qhov av los? Tom qab ua hauj lwm nrog cov neeg tseem ceeb, peb txiav txim tau uas kho qhov no yog ib ib qhov ntsuab teb ua kev txiav txim zoo tshaj.

Qhov kev txiav txim siab tau muab tus taw tes starting tab sis tseem tshuav peb raws li loj ntawm koj khom lub tsheb tawm ib tug zoo zoo rau dov NTXHUAB rau lub enterprise. NTXHUAB yog tej lub loj tsiaj … nws muaj xws li cov kev tswj, ntaub ntawv los xyuas dua, nrhiav, ruaj, cov neeg tuaj saib targeting, Project management, "zoo heev PLAUBCUAG" templates, workflow, ua lag ua luam cov ntaub ntawv connector, yam. Couple no nrog tus Disease fact tias nws yog ib lub koom haum loj uas tau hais tiag kom siv cov zoo txhua tus loj NTXHUAB feature thiab muaj cov makings uas yog ib qhov uas muaj ib qho kev cuag enterprise thiab ntau yam zoo uas ib yawm.

Peb nyob nraum confronted nrog cov teebmeem no ua ke thiab hawm dua … NTXHUAB muaj ib enterprise cuag nrog nws cov enterprise feature teeb, tsis tau cov neeg dog dig txawm sophisticated muaj ib zaus peb absorbing cov nta, cia nyob ib leeg incorporating ib appreciable feem cia rau hauv lawv cov sij hawm sij.

Kuv tsis muaj magic tov rau qhov teeb meem. Kuv txhais nyob xwb heev yog thawj yam uas peb tau muab rau tus neeg mus ua lawv mus rau txoj kev vam meej mus sij hawm ntev los tu.

Tau:

Ntau li ntau kuv xav pab neeg no yuav craft npaj ib qhov uas sau tej milestones li "PoepleSoft xws li ntawm BDC tiav", "Tshiab khaub lig-qho khoom Launch Workflow tag" thiab "Executive Management KPI ntawv txais", Kuv yuav tsum khom rau tej yam tsis tshua. Qhov no yog tsis tau hais tias "cua." phem. qhov tseeb, "cua." Yog tias peb txiav txim siab rau tus thawj zaug rollout mais ua ntej qhov twg lawv twb ua ntej peb yuav pib. Nyob rau hauv peb cov ntaub ntawv, "cua." txia ntshis ua:

  • Tej ntaub ntawv yooj yim tswj siv daim ntawv qiv, Version tswj thiab lus qhia hom.
  • Nrhiav zoo raws cov hom thiab Mekas xub nrhiav (ntawm Managed long-term zog, XSLT yuav tsim tau zoo nkauj, yam).

Ntxiv rau qhov nta enterprise plawg saum toj no (qab hau lawv mus kuav los ua tiag mus saib xyuas thiab cov neeg siv), peb ntxiv tau tej yaam cov nram qab no singleton nyob rau hauv uas mini-num:

  • Tej tswvyim BDC kev koom ua ke.
  • Workflow tej ceg tej kauj ruam thiab cov txheej txheem tsim ntawm SPD.
  • InfoPath daim ntawv txoj.
  • Surfacing KPI tus rau qee cov kev ua lag ua luam (tej zaum HR txuj ci tshaaj nyob hauv peb cov ntaub ntawv, ho uas tej zaum yuav hloov).

Cov tau nov tsis yog 100% yog tiam sis tus sawv cev ntawm peb kev thiab txaus kuv lub hom phiaj ntawm no, uas yog piav dab tsi uas kuv xav kom pib ib "siv" qhia rau sawv daws uas yuav teev tus neeg nqes kev golden nrees rau tag nrho los tu NTXHUAB NTXHUAB.

Kuv yuav tsis sau ntau ntxiv txog cov singleton nyob hauv no tuaj txog. Kuv xav mus taw tes kom paub tias cov no yog cov uas zoo tshaj arching peb. Lub tswv yim no mus siv rau cov tub ntxhais daim ntawv kev tswj thiab ua nrhiav yam ntxwv rau tag nrho cov neeg tsis tau muab tej co, siab pom thiab mas sawv cev piv txwv lwm hoob NTXHUAB nta uas muaj tshaj txoj kev peev xwm feem ntau cov neeg mus ntxaum dej ntawm no thaum ntxov ib tsab. Txawm li cas los, lawv yuav tau "tawm muaj" thiab ib vam hais tias xauj lub lag luam yuav paub txog los yog paub txog lawv thiab xav cov nta rau lawv tus kheej, txoj hau kev los tu siab. Cov dab neeg singleton zoo kuj pab muab peb pab muag "mos txwv" kev ntse winning ob, tej yaam num peb thiab n-theem.

Ua kom dab tsis peb paub thiab yog vim li cas?

Muaj tswm ntawm cov ntaub ntawv los xyuas dua thiab mus nrhiav li ib tus yuav tsum tau enterprise thoob plaws lub hauv paus, peb yuav tsum tau rov mus muab kev txhawb. Thaum muaj teeb meem xwb, qhov no tig ib ncig koj to taub cov ntaub ntawv thiab uas thaum kawg mapped kom to taub cov hom.

Kuv twb nrhiav tau piav txog cov yam tsis tau kev pab tus xibfwb nyuab nyuab heev. Folk ntau kev tau mus kev deb ntawm ib sab laj txog txoj kev kawm ntawd thaum i ntawv yog nyob hauv cov lus database. "I A yog zoo li ib lub rooj database, nws tau txhua txhua yuav tsum thiab saib raws cov ntaub ntawv ntau hom, tab sis i ntau hom ntaub ntawv muaj ntau dua qhov yooj yim integer/hnub, tab sis, kuj "choice" thiab "lookup" thiab cov zoo li no." Peb yuav tham txog "extending" cov hom, npaum li ib tus inherit yuav functionality ntawm hoob kawm los luj kwv oriented lus. Tiam sis qhov no yog obviously tsis yuav pab tau rau lub tsheb thauj mus los koom admin neeg twb tsis muaj keeb kwm yav dhau kev. Xws li, yuav luag txhua uas nyob rau hauv ib lub rollout NTXHUAB matters.

Siv lub Rooj Tswjhwm Saib cov dawb yog iffy. Kuv twb nyob hauv lub tswv yim ib yam txheej thiab xis teb xis chaw ci ntsa iab (los yog vim li ntawd lawv zoo li) duab cov hom thiab lawv ua li cas rau koj ntawd nrhiav thiab seb lawv yuav tsum txhab, yam. Thaum kawg, nws hnov ib txhia cov qij teeb muaj muab, tab sis cov dawb pawg thawj coj saib duab resulting yog ib mess.

Qhov no coj peb mus rau peb lub chaw tam sim no thiab kom deb tshaj plaws zoo landing: ib tug NTXHUAB sandbox site configured qhia cov nta.

Siv lub sandbox site, peb paub:

  • Cov hom:
    • Tsim muaj cov i uas muaj ntau hom ntaub ntawv (ntawv nyeem, hnub tim, xaiv, boolean, lookup, yam).
    • Extending ib i tsim ib tug tshiab i raws li ib tug niam txiv.
    • Searching rau tej ntaub ntawv uas siv i metadata.
  • Daim ntawv qiv:
    • Associating ib tus hluas i nrog rau lub tsev qiv ntawv.
    • Ua li cas thaum peb upload ib tsab ntawv rau tus ntawd lub tsev qiv ntawv?
    • Associating ntau i nrog ib tug doc qiv.
    • Ua li cas thaum peb upload ib tsab ntawv rau tus ntawd lub tsev qiv ntawv?
    • Filtering thiab sorting ntawm kem daim ntawv koom tswj rau ib tug doc lib.
    • Daim ntawv qiv views:
      • Sorting
      • Grouping
      • "Hluav taws nkag" (tej ntaub ntawv saib)
      • "Untagged ntaub" (pab nrog migration rau NTXHUAB los ntawm lwm qhov chaw kawm ntawd; ntxiv rau qhov hauv qab).

Lub Sandbox Site:

Peb tsim peb cov sandbox ntawm yuav tsum feature ruaj khov nyob rau ntawm tej kev siv rau kev kawm thiab ntev tom qab lub project tag peb thiab nrog ntau artifacts nej:

Cov hom:

Peb txhais cov yam nram qab no: Invoice, Yuav yuam kom them, Kev pab cuam Invoice.

Peb xaiv Invoice thiab Purchase yuam vim lawv tseem los universally
sawv chaw. Txhua tus neeg hauv cov lag luam nkag siab tias ib invoice yog ib kev thov rau cov nyiaj them poob ib neeg rau ib tug nqi tawm nyob ib certain hnub tim kom tau nyiaj as per rau tej cov ntsiab lus uas them. Qhov no ua rau yus ib yam lus txhais ntawm ib i uas peb hu ua "kev kawm Invoice" (kom paub qhov txawv ntawm lwm hom invoice). Qhov kev txiav txim purchase mob(nurses) yooj yim txhais. Peb yuav tsim ib tug "cob qhia kev Invoice" tsim ib tug tshiab i raws li cov "Training Invoice" I thiab nws qhia kiag ib tug, "kev pab cuam mus".

Nrog cov saum no, peb tau tam sim no yuav qha cov ib nta i tus tseem ceeb tsis tau bogged rau nram sim piav ib tug paub daws teeb tswvyim ua ntej; to sawv daws twb taub peb txhais li cas los ntawm "invoice" thiab "yuav yuam kom them" thiab txhais tau siab rau ntawm qhov i mechanics xwb.

Kev cai npe:

I nrog txhua yam "lookup" taw tes rau ib tug kev cai sau los yog tsab ntawv qiv. Peb siv feem thiab cov sandbox, peb yuav tsim ib tug txhawb kev cai teev uas muaj cov neeg muas zaub. Peb khaws cov qhua tuaj noj vim nws yog ib qhov tswvyim yooj yim to taub thiab yooj yim rau kev. Tus Invoice i muaj ib sab, "neeg" uas txhais yam "lookup" uas ntxiv rau daim ntawv.

Peb tsim tau ib tug zoo xws li cov kev cai teev uas tswj "cov neeg muag khoom" rau qhov "Purchase yuam" I.

Daim ntawv qiv:

Peb tsim tau ob daim ntawv qiv: "Txib" thiab "Sib xyaw cov ntaub ntawv".

Peb configured lub txib ntawv qiv los tswj ntaub ntawv xwb i yam "Invoice".

Cov "Mixed ntawv configured peb" tsev qiv ntawv uas tswj tas nrho peb i lub.

Tsim ntau views qhia tias sorting, filtering, tej ntaub ntawv thiab cov grouping.

Nrhiav:

Peb yuav txhais ob Managed long-term khoom tshiab thiab mapped Invoice tooj thiab cov neeg.

Peb yuav tsim ib tug tshiab customized xub nrhiav chaw thiab hloov nws yuav pab tau cov neeg mus nrhiav "txib" siv cov ob mapped zog.

Hloov cov XSLT kom invoice thiab neeg coob, Thaum twg tuaj, tshwm sim nyob rau hauv lub rooj HTML rau ib tug twg kaj. Lub hom phiaj ntawm no yog nqai uas tej formatting puas yuav tau.

Sau ua ke:

Peb npaj rau cov neeg tseem ceeb tuaj koom rau hauv ib qhov demo.

Peb ua raws li hauv tsab ntawv no yooj yim:

  1. Piav lub ntsiab lus thiab hom phiaj ntawm ib i, siv txib thiab purchase txiav txim raws li cov qauv no.
  2. Qhia cov invoice i txhais thaum ib txhij qhia lawv tias lawv tsis tau siv cov ntxaij vab tshaus lawv tus kheej, cia li khaws lub tswvyim.
  3. Mus rau lub tsev qiv ntawv daim ntawv txib.
  4. Upload tau ib qho ntaub ntawv.
  5. Paub tias tus neeg muas zaub nco-down yog tiag sourced ntawm ib daim ntawv teev kev cai.
  6. Ntxiv cov neeg tuaj noj tshiab rau cov neeg teev thiab ces hloov rau tus nyuam qhuav uploaded invoice meta tej ntaub ntawv uas muaj xim tshiab khiv created.
  7. Hloov tau mus rau qhov "mixed ntawv" tsev qiv ntawv thiab upload ib tsab ntawv. Piav li cas rau prompts rau ib daim ntawv ntaus.
  8. Mus rov qab rau cov tsev qiv ntawv daim ntawv txib thiab qhia tau tias cas txhaj rau hauv ib kem npe hloov tsi yuam.
  9. Paub cov theem sab filtering.
  10. Qhia txawv views pev ntau theem sorting, filtering thiab grouping.
  11. Qhia tau cov ntaub ntawv saib.
  12. Piav txog lub hom phiaj ntawm lub "untagged ntawv" saib.
  13. Hloov tau mus siab heev tshawb customized.
  14. Lawm los, daim ntawv uas koj nyuam qhuav uploaded yuav tsum tau nkag thiab indexed, yog li ua ib tug tshawb fawb qha tau muaj peev xwm nrhiav tau ntawd invoice ntawm cov cuab yeej mapped.
  15. Peb paub qhov txawv ntawm searching ntawm mapped zog vs. yog ib phau ntawv nrhiav.

Thaum no tus taw tes, peb los ua tas nrog cov demo. Nkawd mus txog 30 mus 45 feeb, nyob ntawm seb muaj pes tsawg tus neeg nug nug.

Peb mam li xa lawv rov qab mus rau lawv cov desks uas muaj "ua". Qhov no muaj ib tug leb mus zoo spreadsheet uas peb hais kom lawv txhais rau peb seb lawv xav li cas lawv xav tau ntawd tus i, ob leeg rau siab npaum li (lub hom phiaj yog npe thiab ua luam) as Well as txhua thiab hom ntaub ntawv lawv yuav muab khaws cia rau sab. Peb tsis txhob hais kom lawv txhais tau ntau hom ntaub ntawv qhia kiag rau hauv cov lus sib NTXHUAB, tab sis cov ntsiab lus uas ua lag ua luam.

Nyob hauv txoj kev:

Peb thiaj tau tsim ib sandbox ib puag ncig uas peb siv tau los ua ib co tub ntxhais NTXHUAB nta uas nyom xub ntxiv no enterprise thoob plaws.

Peb muaj caum tus qauv yooj yim to taub thiab hom lag luam chaw kom cov neeg siv yuav tsom rau NTXHUAB thiab tsis tau bogged rau lub chaw / Piv txwv lawv tus kheej.

Cov neeg siv kev ua lag ua luam mus kev deb ntawm theses zaug uas "cov ntawv ua tom tsev" nyob rau hauv daim ntawv ntawm excel tej ntaub ntawv uas lawv muaj tam sim no competent tau sau thiab siv tau rau koj vim lawv tus kheej ua ntej muab cov hom.

Thaum kawg, raws li peb ua tau demos thaum lub sij hawm, tus neeg pab neeg kom lawv ua tau lub neej rau pem hauv ntej, ua qhov demo ntawv lawv tus kheej thiab feem dawb tuaj so hauv peb tuaj ua hauj lwm nyob rau cov teeb meem ntau, xws li lub ntiaj teb no taxonomy, txoj kev workflows, BDC thiab cov zoo li.

NTXHUAB: Tej cov piv txwv – cov hom kev cai ntaub ntawv

Lag luam Scenario:

Thoob plaws Enterprise teg NTXHUAB rau cov tuam txhab raug nrog 30+ cov chaw thiab ob peb neeg huv dozen.

Cov hom phiaj ua lag ua luam:

Txawm ib tug tibneeg ntau ntau uas ua hauj lwm pab pawg (saib xyuas, qhov chaw, yam), tej ntaub ntawv yuav tsum raug tswj tseg rau ntiaj teb no npaum li. Piv txwv, npaj sau ntaub ntawv pov rau txhua qhov chaw ntawm lub tuam txhab (e.g. raug cov vaj tse, cov chaw zov me nyuam warehouse, chaw muag) yuav tsum tau tswj nyob rau hauv ib qho chaw central.

Kev teeb meem:

Tus enterprise taxonomy yog DVR siv ntau qhov chaw collections. Peb yuav tau nyiam tsim ntaub ntawv pov lub npe ntawm qhov chaw khiav hauj lwm rau lub cev nyob rau hauv kev cai WSS sau. Ces, Thaum peb yuav tsum tau muaj ib kem nyob rau hauv ib chav ntawv kawm yam (los yog ib sab ntxiv rau lub tsev qiv ntawv sau lossis doc) uas muaj nyob tej qhov chaw neeg, peb yuav tsim ib sab siv "lookup cov" datatype thiab taw tes rau daim ntawv npaj.

Hmoov tsis, lookup datatypes no yuav tsum tau nkag los sau "Senior" lub ntsiab lus tias peb kev sau ntaub ntawv pov tsis tau saib ntsoov txog qhov chaw collections.

Kev tov:

Siv hom kev cai ntaub ntawv tshiab DVR raws li SPField thiab cov uas muaj tuaj raws li tus DropDownList hauv lub zog ListItems populate los npaj WSS daim ntawv povhwm poob haujlwm no.

Peb tsim ib tshiab ntawm phau hu ua "http://localhost/EnterpriseData". Muaj, peb tsim tau ib daim ntawv teev kev cai hu ua "Neeg chaw". Daim ntawv cia li siv tus txheem "Title" teb kom muaj daim ntawv ntawm qhov chaw neeg sij.

Ib qho raws li discrete ntau qhov mus tsim ib lub hom kev cai ntaub ntawv nyob rau hauv WSS. Lawv yuav:

  1. Txhais tau ib chav kawm uas inherits ntawm SPField (ib tug yuav inherit los ntawm lwm tus tswv num yog yuav tsum tau).

Ntawm no yog cov chaws rau cov uas:

pej xeem hoob XYZZYCorporateLocationField : SPFieldText
{
pej xeem XYZZYCorporateLocationField
(SPFieldCollection liaj teb, hlua typeName, hlua displayName)
: puag(liaj teb, typeName, displayName) { }

pej xeem XYZZYCorporateLocationField
(SPFieldCollection liaj teb, hlua displayName)
: puag(liaj teb, displayName) { }

pej xeem override BaseFieldControl FieldRenderingControl
{
txais
{
BaseFieldControl tswj = tshiab XYZZYCorporateLocationFieldControl();
hwj xwm. FieldName = qhov no.InternalName;
rov qab los tswj;
} //txais
} // fieldrenderingcontrol

pej xeem override hlua GetValidatedString(nruas tus nqi)
{
Yog hais tias (qhov no.Yuav tsum tau || tus nqi. ToString().Qhov sib npaug(Txoj hlua.Npliag))
{
pov tshiab SPFieldValidationException ("Department yuav tsis raug ua hauj lwm.");
}
rov qab los puag.GetValidatedString(tus nqi);
} // getvalidatedstring

} // XYZZYCorporateLocation

  1. Txhais tau lwm cov hoob uas inherits los ntawm cov tswv teb tswj, raws li nyob rau hauv:

pej xeem hoob XYZZYCorporateLocationFieldControl : BaseFieldControl
{
kev tiv thaiv DropDownList XYZZYCorporateLocationSelector;

kev tiv thaiv override hlua DefaultTemplateName
{
txais
{
rov qab los "XYZZYCorporateLocationFieldControl";
}
} // DefaultTemplateName

pej xeem override nruas Tus nqi
{
txais
{
EnsureChildControls();
rov qab los qhov no.XYZZYCorporateLocationSelector.SelectedValue;
} // txais
teem caij
{
EnsureChildControls();
qhov no.XYZZYCorporateLocationSelector.SelectedValue = (hlua)qhov no.ItemFieldValue;
} // teem caij
} // override tus nqi kwv

kev tiv thaiv override khoob lug CreateChildControls()
{

Yog hais tias (qhov no.Teb == null || qhov no.ControlMode == SPControlMode.Zaub)
rov qab los;

puag.CreateChildControls();

qhov no.XYZZYCorporateLocationSelector =
(DropDownList)TemplateContainer.FindControl("XYZZYCorporateLocationSelector");

Yog hais tias (qhov no.XYZZYCorporateLocationSelector == null)
pov tshiab Kos("KEV UA YUAM KEV: Tsis tau thauj khoom. Cov ntaub ntawv ASCX!");

Yog hais tias (!qhov no.Phab IsPostBack.)
{

siv (SPSite kawm ntawv = tshiab SPSite("http://localhost/enterprisedata"))
{
siv (SPWeb Web = kawm ntawv. OpenWeb())
{

Splist.Update() currentList = web. Teev["Neeg qhov chaw"];

foreach (SPItem XYZZYCorporateLocation nyob rau hauv currentList.Items)
{
Yog hais tias (XYZZYCorporateLocation["Title"] == null) ntxiv mus;

hlua theTitle;
theTitle = XYZZYCorporateLocation["Title"].ToString();

qhov no.XYZZYCorporateLocationSelector.Items.Add
(tshiab ListItem(theTitle, theTitle));

} // foreach

} // siv lub web spweb = site.openweb()
} // siv qhov chaw spsite = spsite tshiab("http://localhost/enterprisedata")

} // nws tsis yog ib tug postback

} // CreateChildControls

} // XYZZYCorporateLocationFieldControl

Cov cai saum toj no yeej implements lub logic rau populating tus DropDownList uas qhov tseem ceeb ntawm cov WSS kev cai sau nyob hauv http://localhost/enterprisedata thiab raug teev hais "neeg huv".

Kuv txhais ob hoob nyob hauv ib tus neeg ua ntaub ntawv thov tib .cs, compiled nws thiab muab tso rau hauv lub GAC (strong yuav tsum, tau mas).

  1. Siv ib txoj kev los tswj template (.ascx) li:

<%@ Tswj Hais lus= "C#" Inherits="Microsoft.SharePoint.portal.ServerAdmin.CreateSiteCollectionPanel1,Microsoft.SharePoint.portal,Version = 12.0.0.0, Culture = nruab nrab,PublicKeyToken = 71e9bce111e9429c" compilationMode= "Ib txwm" %>
<%
@ Rau npe Tagprefix= "wssawc" Namespace="Microsoft.SharePoint.WebControls" Sib dhos="Microsoft.SharePoint, Version = 12.0.0.0, Culture = nruab nrab, PublicKeyToken = 71e9bce111e9429c" %> <%@ Rau npe Tagprefix= "SharePoint" Namespace="Microsoft.SharePoint.WebControls" Sib dhos="Microsoft.SharePoint, Version = 12.0.0.0, Culture = nruab nrab, PublicKeyToken = 71e9bce111e9429c" %>
<SharePoint:RenderingTemplate ID= "XYZZYCorporateLocationFieldControl" runat= "neeg rau zaub mov">
<Template>
<asp:DropDownList ID= "XYZZYCorporateLocationSelector" runat= "neeg rau zaub mov" />
</Template>
</
SharePoint:RenderingTemplate>

Cov hais los saum toj no rua hauv c:\qhov kev pab cuam filescommon filesmicrosoft sharedweb neeg rau zaub mov extensions12controltemplates.

  1. Thaum kawg, tsim ntaub ntawv XML mus kaw rau hauv peb cov... 12XML directory. No yog cov nyiaj thiab lub sij muaj peb cov hom ntaub ntawv rau kev cai CAML thiab rau kuv piv txwv, zoo li no:

<?xml Version="1.0" encoding="utf-8" ?>
<
FieldTypes>
<
FieldType>
<
Teb Lub npe="TypeName">CorporateLocations</Teb>
<
Teb Lub npe="ParentType">Ntawv nyeem</Teb>
<
Teb Lub npe="TypeDisplayName">Qhov chaw neeg</Teb>
<
Teb Lub npe="TypeShortDescription">Txhua XYZZY neeg qhov chaw xws li manufacturing los yog lwm lub chaw.</Teb>
<
Teb Lub npe="UserCreatable">MUAJ TSEEB</Teb>
<
Teb Lub npe="ShowInListCreate">MUAJ TSEEB</Teb>
<
Teb Lub npe="ShowInDocumentLibraryCreate">MUAJ TSEEB</Teb>
<
Teb Lub npe="ShowInSurveyCreate">MUAJ TSEEB</Teb>
<
Teb Lub npe="ShowInColumnTemplateCreate">MUAJ TSEEB</Teb>
<
Teb Lub npe="FieldTypeClass">Conchango.XYZZYCorporateLocationField, XYZZYCorporateLocationField, Version = 1.0.0.0, Culture = nruab nrab, PublicKeyToken = b0b19e85410990c4</Teb>
<
RenderPattern Lub npe="DisplayPattern">
<
Mus>
<
Expr>
<
Kem />
</
Expr>

<Rooj plaub no Tus nqi=""/>

<Neej ntawd>
<
HTML>
<![CDATA[
<ntsua kev style = "xim:Liab"><b>]]>
</
HTML>

<
Kem SubColumnNumber="0" HTMLEncode="MUAJ TSEEB"/>

<HTML><![CDATA[</b></ntsua kev>]]></HTML>

</
Neej ntawd>
</
Mus>

</
RenderPattern>
</
FieldType>
</
FieldTypes>
Tej ntaub ntawv no XML ntxiv seb yam ntaub ntawv rau kev cai WSS "qiv" thiab ntais ntawv up against lub GAC tau los ua ke.

Tom qab koj tsiv rau tag nrho cov khoom rau hauv qhov chaw, iisreset rau tus neeg rau zaub mov thiab nws yuav tsum tau tag nrho cov pib ua hauj lwm nicely.

NTXHUAB: Muab kho dua ib daim ntawv teev kev cai

Muaj ntau ntau yam zoo qauv uas tau muab kho dua kev cai lub npe ntawm tus SDK. Ntawm no yog tseem muaj lwm.

Cov teeb meem ua lag ua luam: InfoPath daim ntawv twb tau tsim cov neeg enables sau hauv internet muas requisitions. PO kev thov xovtooj yuav tsum muaj tsoos sib lawv liag raws integer qhov tseem ceeb thiab payment txiav.

Kev hais haum ua lag ua luam: Tsim kev cai NTXHUAB sau uas muaj txhua ob: "ControlField" thiab "ControlValue". Cov qhia kiag muaj pes tsawg kev thov tom ntej purchase. Nco ntsoov tias cov generic "tswj" naming convention thiab muab tej liaj teb kom yav tom ntej uas yuav siv raws li xav tau.

Kev tov: Tsim rau Web site qhov accessed los rau tus thov kev pab InfoPath. Cov Web site qhov rov qab rau tus tom ntej purchase kev thov tooj thiab siab tus nqi ntawm daim ntawv.

Cov tshooj lus kawm:

  • Thaum ntxiv no cov qhov Web site li ib lub qhov ntaub ntawv daim InfoPath, Kuv pom tias nws yuav hloov mus rau ib udc thiab muab tso rau hauv cov tsev qiv ntawv kev twb kev txuas.
  • Kuv kuj pom tias nws yuav pab kom cov sau khaub lig scripting ntawm central services administration // ntaub ntawv los xyuas dua // daim ntawv neeg rau zaub mov configuration.
  • Thawj zaug hauv daim ntawv sim mus saib hauv web rau, nws yuav siv ib pliag thiab yuam, nws yuav lub sij hawm tawm. Kuv muaj nqis nyob hauv daim ntawv rau neeg rau zaub mov configuration los nthuav lub timeout chaw fiddled thiab uas pab seemed.

Qhov chaws:

siv Tsim;
siv System.Web;
siv System.Web.Services;
siv System.Web.Services.Protocols;
siv Microsoft.SharePoint;
siv System.Configuration;

[WebService(Namespace = "http://www.conchango.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
pej xeem hoob PoService : System.Web.Services.WebService
{
pej xeem PoService () {

//Cov lus hauv qab no kab yog siv tsim Cheebtsam uncomment
//InitializeComponent();
}

/// <txoj kev>
/// Kom coob PO tom ntej sharepoint po tooj tswj daim ntawv.
/// Increment tus PO xov tooj nyob hauv daim ntawv ntawd.
/// </txoj kev>
/// <rov qab los></rov qab los>
[WebMethod]
pej xeem hlua GetNextPoNumber()
{
hlua SpPoControlSiteName; // Lub npe ntawm lub txoos NTXHUAB kawm uas hosts PO kom daim ntawv.
hlua SpPoControlListName; // Lub npe ntawm sij NTXHUAB daim ntawv uas muaj kev tswjhwm Po.

SpPoControlSiteName = ConfigurationSettings.AppSettings["PoControlListHostingSite"].ToString();
SpPoControlListName = ConfigurationSettings.AppSettings["PoControlList"].ToString();

hlua nextPoReqNumber = "xyzzy";

siv (SPSite kawm ntawv = tshiab SPSite(SpPoControlSiteName))
{
siv (SPWeb Web = kawm ntawv. OpenWeb())
{

Splist.Update() currentList = web. Teev[SpPoControlListName];

foreach (SPItem controlItem nyob rau hauv currentList.Items)
{

Yog hais tias (((hlua)controlItem["ControlField"]).Qhov sib npaug("NextPoNumber"))
{
nextPoReqNumber = (hlua)controlItem["ControlValue"];

rau cov menyuam int_nextPoReqNumber;
int_nextPoReqNumber = Hloov ua lwm yam.ToInt32(nextPoReqNumber);

int_nextPoReqNumber ;

controlItem["ControlValue"] = int_nextPoReqNumber;
controlItem.Update();
}

} // Nrhiav, nyeem ntawv thiab muab kho dua tus PO xov tooj nyob hauv daim ntawv.


} // siv lub web spweb = site.openweb()
} // siv qhov chaw spsite = spsite tshiab("http://localhost/mizuho")

rov qab los nextPoReqNumber;

}
}