# Implementation summary — AN-49

**Design:** Opportunity Closed Won Validation

## Files written
- `force-app/main/default/objects/Opportunity/fields/CloseDate.field-meta.xml`
- `force-app/main/default/objects/Opportunity/fields/Amount.field-meta.xml`
- `force-app/main/default/objects/Opportunity/fields/StageName.field-meta.xml`
- `force-app/main/default/objects/Opportunity/fields/Name.field-meta.xml`
- `force-app/main/default/objects/Opportunity/fields/AccountId.field-meta.xml`
- `force-app/main/default/objects/Opportunity/validationRules/Closed_Won_Requires_CloseDate_And_Amount.validationRule-meta.xml`
- `force-app/main/default/permissionsets/Opportunity_Create_Edit_Access.permissionset-meta.xml`

## Acceptance criteria

- Users can create and edit Opportunities.
- Opportunity must have the following fields: Opportunity Name, Account, Stage, Close Date, Amount.
- When Stage is changed to 'Closed Won': Close Date must be populated and Amount must be greater than $0.
- If either condition is not met, Salesforce should prevent the save and display the error message: 'For a Closed Won Opportunity, Close Date is required and Amount must be greater than $0.'