Category Archives: Shorts

Power Apps & SharePoint ID Delegation

Short #23 – The SharePoint ID delegation trap Need to retrieve SharePoint items where ID > 1000? There’s a catch. Although SharePoint’s built-in ID column is numeric, the > operator isn’t delegable for it in Power Apps. You’ll see the … Continue reading →

Posted in Canvas Apps, Power Apps, SharePoint, Shorts | Tagged , , | Leave a comment

Client Context in AddIn

SharePoint Short #22 How to get the client context for code in a provider-hosted add-in that is called outside of the SharePoint context. For example, you want a page in your solution to be called directly and not from SharePoint. … Continue reading →

Posted in SharePoint, Shorts | Tagged | Leave a comment

Add Field with XML

SharePoint Short #21 A quick short today 🙂 Instead of adding new fields to a content type or list creating the object (SPFieldText, etc.) and adding it, simply pass the XML definition for whatever field you are looking to create … Continue reading →

Posted in SharePoint, Shorts | Tagged | Leave a comment

Run With Elevated Privilges

SharePoint Short #20 Instead of explicitly wrapping code in a RunWithElevatedPrivileges block, it’s better to first check if the user has sufficient privileges and only elevate when they don’t. Instead of: SPSecurity.RunWithElevatedPrivileges(() => { // elevated code… });SPSecurity.RunWithElevatedPrivileges(() => { … Continue reading →

Posted in SharePoint, Shorts | Tagged | Leave a comment

Custom_AddDocLibMenuItems

SharePoint Short #19 When implementing your own Custom_AddDocLibMenuItems, which allows you to add custom menu items to the ECB of SharePoint items, remember to check for other implementations of this method before your own version. For example: function YourImplementationOf_AddDocLibMenuItems(m, ctx, … Continue reading →

Posted in SharePoint, Shorts | Tagged , | 4 Comments