Sharepoint Deployment etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Sharepoint Deployment etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

Çarşamba, Ağustos 31, 2016

SharePoint Autonumber Custom List Field

  1. Open your web site in SPD.
  2. Create a new workflow. In the File menu, select New->Workflow...
  3. In the dialog that appears, give the workflow a name, e.g. "Assign Customer Number". In the drop-down list below, choose to connect the workflow to the list you want to assign autonumbers to (In this case, this would be a list called Customers). Then check the middle option of the three check boxes below, "Start this workflow automatically when a new item is created".
  4. On the same dialog, there is a button at the bottom called "Variables...". Click it. Choose "Add", name it "mNumber" and make it of type "Number". Click OK, and OK again. Now, click "Next" in the dialog.
  5. You can leave the step name as is ("Step 1"). Leave the "Condition" empty, and click the "Actions" button. In the menu that appears, select "Set workflow variable". This will add an action to the list to the right of the Actions button. Now you need to set up this action. Click the link "Workflow variable", this will open a small dropdown list. Select "Variable: mNumber". Then click the next link, "value". This will display a textbox and a small button in place of the link. Click the button ("Show databindings"). This will bring up a new dialog, where you will select the value to assign to the "mNumber" variable. In the "Data Source" drop down, select "Unique Numbers". In the drop down just below ("Field:") select "NextNumber". Now, the dialog will be expanded with a "Find list object" section. In the drop down "Field:", select "Unique Numbers:Title", and in the value box below, typeCUSTOMERNO. Click OK. SPD will now give a warning that the look up might return more than one value, just select "Yes" to continue here.
  6. Now you add one more action. Click the "Actions" button and select "Set field in current object". Click the "field" link in the new action, and in the list that appears, select the field in your list that is the target of the autonumber (e.g. "CustomerNo"). Then click the "value" link, and once again click the little button that appears ("Show databindings"). This time, in the "Data Source" drop down, select "Workflow data", and then in the next drop down, select the variable "mNumber". Click OK.
  7. Add yet another action, this time choose the "Update list item" action. Click the link in the new action, "update list object in this list". This brings up another dialog, in the "List" drop down, select "Unique Numbers". Click the "Add" button just below to the right, and in the new dialog's first drop down ("Set this field:"), select "LastNumber" and to the right of the "To this value:" text box, click the formula button. Again, a new dialog appears, in the "Data Source" dropdown, select "Workflow data" and then in the "Field" drop down, select "Variable: mNumber". Click OK twice to get back to the "Update list item" dialog. Now, once again in the "Find list object" section, select "Unique Numbers:Title", and type in the value CUSTOMERNO. SPD will give a warning again, click "Yes".
  8. That's it. Click the "Finish" button, and if all is well, the workflow will be created.

Now, everytime you add a new item to the "Customers" list, this workflow will run and assign an auto-incrementing number to the "CustomerNo" field.

Hope this helps,
Source

Turhal Temizer

Perşembe, Temmuz 28, 2016

SharePoint Solutions - Add, Deploy, Retract ve Remove - PowerShell ve STSADM

Sharepoint ürünleri ile haşır neşirseniz *.wsp 'lerin güncellenmesi ile çok sık karşılaşıyorsunuzdur. Bu işlemi yapabilmek için Central Admin 'e girip "retract a solution” seçeğini seçiyor ve genellikle başarısız oluyoruz. Başarısızlığımızda alt kısımdaki gibi bir mesajla süsleniyor.

Hata Mesa:
"A feature with ID xxxxxxxxx has already been installed in this farm. Use the force attribute tı explicitly re-install the feature."

Peki wsp 'i güncelleme işlemini nasıl yapacağız.

1. Powershell ile kullanımdan çıkartma (Retract) işlemi:
Bu adımı standart dosya işlemlerindeki çöp kutusuna taşıma adımı ya da IIS üzerinde application olarak ayarlanmış sitenin silinmesi adımı olarak düşünebilirsiniz.

Unistall-SPSolution -Identity solutionName.wsp -WebApplication http://SharepointWebApp/

2. STSADM ile silme (Remove) işlemi:
Bu adımı çöp kutusuna taşınan dosyanın silinmesi ya da IIS üzerinde silinen web application 'nın klasör olarakta silinmesi işlemi olarak düşünebilirsiniz.

stsadm -o deletesolution -name "solutionName.wsp” -override

3. PowerShell ile Ekleme (Add) işlemi:
Add-SPSolution -LiteralPath E:TempDeploymentsolutionName.wsp

4. PowerShell ile Kullanıma (Deploy) Alınması ("-Force” ile yapılması tavsiye edilir)
Install-SPSolution -Identity Common.wsp -WebApplication http://SharepointWebApp/ -GACDeployment -Force

Umarım çözümlerinizde yardımcı olabilir.

Turhal Temizer

SharePoint Solutions – Add, Deploy, Retract and Remove using PowerShell and STSADM

When you want to update a solution, sometimes you can’t retract a solution from Central Admin.

Error messages:
"A feature with ID xxxxxxxxx has already been installed in this farm. Use the force attribute to explicitly re-install the feature.”

Do the following:

  1. Use PowerShell to Retract the solution:

Uninstall-SPSolution -Identity solutionName.wsp –WebApplication http://SharepointWebApp/

  1. Use STSADM to remove the solution:
    (Go to the command line (Start – Run – cmd), then go to this path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN, then type the following command)

stsadm -o deletesolution -name "solutionName.wsp" -override

  1. Use PowerShell to add the solution:

Add-SPSolution -LiteralPath C:TempmovingsolutionName.wsp

  1. Use PowerShell to deploy the solution (with "-Force” attribute):

Install-SPSolution –Identity CustomerDetails.wsp –WebApplication http://SharepointWebApp/ –GACDeployment -Force

Turhal Temizer