completed assignment

This commit is contained in:
2025-04-02 17:50:49 +05:30
parent 35e7485001
commit 72f2541f58
32 changed files with 531 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
trigger CategorizedOpprtunity on Opportunity (before insert, before update) {
for (Opportunity opp : Trigger.New)
{
if (opp.Amount != null)
{
if (opp.Amount < 10000)
{
opp.Category__c = 'Small';
}
else if (opp.Amount >= 10000 && opp.Amount < 50000)
{
opp.Category__c = 'Medium';
} else if (opp.Amount >= 50000) {
opp.Category__c = 'Large';
}
}
}
}