Fix #5467: related to default column value / event receiver issue - #5468
gautamdsheth wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The accompanying Framework change downgrades unrelated registration failures to warnings by catching every ServerException.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a warning when SharePoint cannot register the event receiver required to apply stored default column values.
Changes:
- Checks for the required event receiver after storing defaults.
- Warns when defaults will not be applied.
- Documents the behavior change in the changelog.
File summaries
| File | Description |
|---|---|
src/Commands/Lists/SetDefaultColumnValues.cs |
Adds event-receiver verification and warning. |
CHANGELOG.md |
Records the changed failure behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (list.GetEventReceiverByName("LocationBasedMetadataDefaultsReceiver ItemAdded") == null) | ||
| { | ||
| LogWarning("The default column values have been stored, but the 'LocationBasedMetadataDefaultsReceiver ItemAdded' event receiver could not be registered on the list, so SharePoint will not apply them to newly added items."); |
|
For now we found an alternative: |
…ceiver registration failure and provide a warning for stored default column values
|
In my opinion this is not a fix, it's a bypass. If we don't want to use the rest api as an alternative (no idea how long that keeps working) my suggestion would to let it fail by default and implement another book parameter skipAddingEventReciever |
Type
Related Issues?
Fixes #5467
What is in this Pull Request ?
Log warning for event receiver issue when setting default column value