I am working on a Item Update event receiver in a Share Point document library. Solution: The method to get the after properties with the actual hour is a little different.
The code to extract before and after values on that field is: I selected a date of April 14, 2016 in the calendar control on the Edit Form page.
Since it is a future date (today's date is March 12, 2016), I displayed an error message to alert the user of the constraint violation and also displaying the entered date and the current day's date.
So if anything else is changed the workflow will not start unless the 'approval' value is. Thanks, Check if the two values are not equal to each other, and if the updated value is equal to "approve".
If both are true, start a workflow on the list item programmatically- here are some links to help you with that: coding!
But the error message is displaying 04/13/2016 instead of 04/14/2016.
Regardless of how Share Point stores the input value in the database, how do I get the value exactly as entered in the form so I can display that same value in any error message?
This was my scenario: I had created a remote event receiver that was attached to a document library and was supposed to act whenever an item in the list was updated.
The initialization of the event receiver looks like this: And all was fine in the world.
When a user selects a date and clicks on the OK/save button, the event receiver method must validate the date value by checking if the selected date is less than or equal to the current day's date. To Short Date String(); // Code to retrieve post-updating value value = event Properties.