mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 03:09:50 +08:00
Merge pull request #4 from forcedotcom/getting-started-prompts
Initial starter prompts
This commit is contained in:
commit
deae018c06
BIN
prompts/getting-started/.DS_Store
vendored
Normal file
BIN
prompts/getting-started/.DS_Store
vendored
Normal file
Binary file not shown.
9
prompts/getting-started/create-basic-custom-object.md
Normal file
9
prompts/getting-started/create-basic-custom-object.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Project Object Quickstart
|
||||
description: Scaffold a Project__c custom object with core fields and deployable metadata.
|
||||
tags: salesforce, custom-object, beginner
|
||||
---
|
||||
|
||||
Create a new Project__c object with an autonumber field {proj-0000}, name, start date, and number of days fields that represent a simple project record.
|
||||
|
||||
Deploy this metadata to my org using the Salesforce DX MCP Server.
|
||||
13
prompts/getting-started/first-lightning-web-component.md
Normal file
13
prompts/getting-started/first-lightning-web-component.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
name: Hello World LWC Starter
|
||||
description: Generate a greeting Lightning Web Component and explain its HTML, JS, and metadata files.
|
||||
tags: lwc, ui, beginner
|
||||
---
|
||||
|
||||
Help me create my first Lightning Web Component.
|
||||
|
||||
Generate a basic LWC that displays a greeting message. Provide the HTML, JavaScript, and meta configuration files, and provide comments on how each file works.
|
||||
|
||||
Deploy this metadata to my org using the Salesforce DX MCP Server.
|
||||
|
||||
Display instruction on how to add the LWC to a new Home page.
|
||||
11
prompts/getting-started/formula-field-days-till-close.md
Normal file
11
prompts/getting-started/formula-field-days-till-close.md
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Opportunity Days Till Close Formula
|
||||
description: Build an Opportunity formula that calculates days between CreatedDate and CloseDate.
|
||||
tags: formula, opportunity, admin
|
||||
---
|
||||
|
||||
Create a formula field on `Opportunity` named `Days till Close` that calculates the number of days between the `CreatedDate` and `CloseDate` fields, if `CloseDate` is not null.
|
||||
|
||||
Deploy this class to my org using the Salesforce DX MCP Server.
|
||||
|
||||
Provide instruction on how to set field level security for my profile and add the new field to the page layout.
|
||||
@ -0,0 +1,9 @@
|
||||
---
|
||||
name: StringUtils Utility Scaffold
|
||||
description: Create a foundational StringUtils Apex helper with core string methods and unit tests.
|
||||
tags: apex, utility, testing
|
||||
---
|
||||
|
||||
Create an `StringUtils` Apex utility class with common string helpers such as isBlank, trimToNull, and safe string-to-integer conversion. Include a focused test class that covers each helper method with both typical inputs. Do not test for edge casees at this time.
|
||||
|
||||
Deploy the classes to my org and run the unit tests, using the Salesforce DX MCP Server.
|
||||
16
prompts/getting-started/simple-apex-utility-class.md
Normal file
16
prompts/getting-started/simple-apex-utility-class.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
name: DateUtils Utility Primer
|
||||
description: Generate a documented DateUtils Apex class with daysBetween and addDays helpers.
|
||||
tags: apex, utility, beginner
|
||||
---
|
||||
|
||||
Generate a small `DateUtils` Apex utility class. Include clear comments so I can understand the overall structure and common Apex patterns.
|
||||
|
||||
Create the following two methods:
|
||||
|
||||
- A method named daysBetween that returns the number of days between two dates. If either date is null, return null instead of throwing an exception.
|
||||
- Add a method named addDays that returns a new date by adding a given number of days to a base date. If the base date is null, return null.
|
||||
|
||||
Do not create unit tests at this time.
|
||||
|
||||
Deploy this class to my org using the Salesforce DX MCP Server.
|
||||
@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Opportunity Stage Score Formula
|
||||
description: Craft a readable Opportunity formula that assigns numeric scores per stage.
|
||||
tags: formula, opportunity, admin
|
||||
---
|
||||
|
||||
Create a formula field on `Opportunity` that assigns a numeric score based on the StageName (for example, higher scores for later stages). Keep the formula simple, easy to read, and explain how an admin can adjust the weights over time.
|
||||
|
||||
Deploy the metadat to my org using the Salesforce DX MCP Server.
|
||||
|
||||
Provide instruction on how to set field level security for my profile and add the new field to the page layout.
|
||||
9
prompts/getting-started/test-data-factory-basics.md
Normal file
9
prompts/getting-started/test-data-factory-basics.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Test Data Factory Kickoff
|
||||
description: Build an Apex factory for Accounts, Contacts, and Opportunities with usage examples.
|
||||
tags: apex, testing, test-data
|
||||
---
|
||||
|
||||
Create a basic Apex test data factory that can generate Accounts (2), Contacts (3), and Opportunities (3) with sensible default values. Include example test methods that use the factory and explain how it helps keep tests clean and maintainable.
|
||||
|
||||
Deploy the metadat to my org using the Salesforce DX MCP Server.
|
||||
11
prompts/getting-started/trigger-and-handler-example.md
Normal file
11
prompts/getting-started/trigger-and-handler-example.md
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Account Trigger Starter
|
||||
description: Create a simple Account trigger and handler that sets default values before insert.
|
||||
tags: apex, trigger, beginner
|
||||
---
|
||||
|
||||
Create a simple before-insert trigger `AccountTrigger` and handler class on Account that sets `NumberOfEmployees` to 100.
|
||||
|
||||
Do not create unit tests at this time.
|
||||
|
||||
Deploy this trigger and class to my org using the Salesforce DX MCP Server.
|
||||
9
prompts/getting-started/validation-rule-on-account.md
Normal file
9
prompts/getting-started/validation-rule-on-account.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Account Employee Validation Rule
|
||||
description: Draft a rule that blocks Account save when NumberOfEmployees is blank.
|
||||
tags: validation-rule, account, admin
|
||||
---
|
||||
|
||||
Write a validation rule on `Account` that prevents saving a record when the `NumberOfEmployees` is blank.
|
||||
|
||||
Deploy this metadata to my org using the Salesforce DX MCP Server.
|
||||
Loading…
Reference in New Issue
Block a user