2016-11-14

BeforeProperties AfterProperties ListItem in Sharepoint Event Receivers

Important while developing sharepoint event receivers.

BTW, I've read a article that said change Element.xml Synchronization to Synchronous, we can get BeforeProperties on List events, but I cannot find this reference now.

I'll make some test to confirm it. (Maybe many days or months later......)

List:
ListBeforePropertiesAfterPropertiesproperties.ListItem
ItemAddingNo valueNew valueNull
ItemAddedNo valueNew valueNew value
ItemUpdatingNo valueChanged valueOriginal value
ItemUpdatedNo valueChanged valueChanged value
ItemDeletingNo valueNo valueOriginal value
ItemDeletedNo valueNo valueNull

Library:
LibraryBeforePropertiesAfterPropertiesproperties.ListItem
ItemAddingNo valueNo valueNull
ItemAddedNo valueNo valueNew value
ItemUpdatingOriginal valueChanged valueOriginal value
ItemUpdatedOriginal valueChanged valueChanged value
ItemDeletingNo valueNo valueOriginal value
ItemDeletedNo valueNo valueNull

Reference:
BeforeProperties and AfterProperties in Sharepoint Event Receivers
SPEventReceiverDefinition.Synchronization Property

2014-05-23

The Unattended Service Account Application ID is not specified or has an invalid value.

Steps Taken:
  1. Open Health Analyzer and view details
  2. Manage the Visio Graphics Service (SA) and confirm Application ID is empty.
  3. Manage the Secure Store Service (SA) and Generate New Key
  4. Create a New Target Application
  5. Provide a unique ID, name, and contact email. Select Group Type.
  6. Accept default and just click Next
  7. Provide a user name for both fields.  I used “DEMOAdmin” as that is the only user on this machine. Click OK.
  8. Enter the Target Application ID back on the Visio Graphics Service (SA) page and click OK.
  9. Go to the Health Analyzer rule, open it and click Reanalyze Now, then you should be ready to go.  

Reference 1
Reference 2

The Security Token Service is unavailable

Run the following commands one by one on SharePoint PowerShell:

$h = Get-SPServiceHostconfig

$h.Provision()

$services = Get-SPServiceApplication

foreach ($service in $services) { $service.provision();
write-host $service.name}



Reference

2014-05-07

Sharepoint建立站台時找不到預設Feature.

出現下列錯誤

The site template requires that the Feature {e995e28b-9ba8-4668-9933-cf5c146d7a9f} be activated in the site collection. 

2013-11-26

要用jQueryUI的注意事項

切記順序很重要! jquery.js一定要擺在jquery-ui.js之前, 不然怎麼用都沒效 Orz
    <link href="../jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="../jquery-1.10.2.js">
    <script src="../jquery-ui.min.js">

2013-09-26

20130925劉櫂豪立委質詢黃世銘檢察總長

不慍不火的論述把質詢講得清清楚楚, 每段論述都切到重點, 
這段只要是台灣的公民都應該認真的花十三分鐘聽完它

2013-04-15

Linux crontab 不重覆執行, 前一次若尚在執行則跳過

國內的教學網站大部分都只提到怎麼用crontab,
只有翻到英文與簡中的教學

10 * * * *  flock -xn /tmp/test.lock -c '/home/test/test.sh'