Week 1-2 Exercises
Beginner
Exercise 1: Hello World User Event
Create a User Event script that logs "Hello, [Customer Name]!" in the afterSubmit entry point when a Customer record is saved.
- Use record.getValue() to get the company name
- Log an audit message with the greeting
- Deploy to Customer records
Beginner
Exercise 2: Field Default Client Script
Create a Client Script that sets default values when creating a new Sales Order.
- Set the memo field to "Created via script"
- Set today's date in a custom date field
- Only run on create mode (check context.mode)
Week 3-4 Exercises
Intermediate
Exercise 3: Customer Lookup Search
Create a saved search in code that finds all customers with open invoices over $1,000.
- Use search.create() with appropriate filters
- Include columns: name, email, balance
- Log results with customer details
Intermediate
Exercise 4: SuiteQL Report
Write a SuiteQL query that returns the top 10 customers by total sales this year.
- Join customer and transaction tables
- Filter to Sales Orders only
- Group by customer with SUM of total
- Order by total descending
Week 5-6 Exercises
Intermediate
Exercise 5: Order Confirmation Email
Create a User Event that sends an order confirmation email when a Sales Order is approved.
- Check if status changed to "Pending Fulfillment"
- Use email.send() with HTML body
- Link email to the Sales Order record
Intermediate
Exercise 6: Custom Data Entry Form
Build a Suitelet form for entering customer feedback.
- Add fields: Customer (select), Rating (1-5), Comments
- Save feedback to a custom record
- Redirect to success page after submission
Week 7-8 Exercises
Advanced
Exercise 7: Batch Update Map/Reduce
Create a Map/Reduce script that updates all inactive customers' status.
- getInputData: Search for inactive customers
- map: Update a custom "review date" field
- summarize: Log total processed count
Advanced
Exercise 8: Interactive Dashboard
Build a Suitelet dashboard that displays key metrics and triggers a report.
- Display summary cards with customer/order counts
- Add a button to trigger a Map/Reduce export
- Show task status with polling