Example Technical Test: SharePoint, C#, and JavaScript
Instructions
This test assesses your skills in SharePoint, C#, and JavaScript.
Please complete all sections and submit your answers, including any required code
snippets, in a single document.
You may use any resources available to you, but plagiarism will not be tolerated.
Explain your reasoning wherever applicable.
Section 1: SharePoint
Question 1: Document Library Workflow
Design a workflow that automates approval for documents uploaded to a SharePoint
document library.
Steps:
1. Create an automated flow triggered when a document is uploaded.
2. Implement a multi-level approval process (e.g., Manager, then Director).
3. Update a metadata field (e.g., Status) based on the approval outcome.
Describe how you would configure this flow in Power Automate or SharePoint Designer.
Question 2: PnP.js Code Challenge
Write a JavaScript function using PnP.js that retrieves and displays the 10 most recently
modified files from a SharePoint document library.
Your function should log the file name, modified date, and URL to the console.
Section 2: C#
Question 1: CRUD Operations
Write a C# console application that connects to a SharePoint site and performs the
following operations on a document library:
1. Retrieve and display all file names and their IDs.
2. Upload a new file to the library.
3. Delete a file by its ID.
Provide the code and explain any assumptions.
Question 2: Interface Implementation
Design and implement an interface in C# for a logging system. The interface should have
methods for logging messages and errors.
Provide a concrete implementation of the interface that logs entries to a text file. Include an
example of how this implementation would be used.
Section 3: JavaScript
Question 1: Form Validation
Create a JavaScript function that validates form data. The form contains fields for email,
phone number, and date.
The function should check:
- Email is in a valid format.
- Phone number contains exactly 10 digits.
- Date is in the format YYYY-MM-DD.
Return an object indicating whether the form is valid and listing any validation errors.
Question 2: REST API Integration
Write a JavaScript function that makes a POST request to a REST API to update the status of
a SharePoint list item.
Include error handling and provide an example payload.