• Sudhanshu Pandey 15
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Need to solve a problem, I need to throw a error if the record with different value of country is inserted in object. Example: I need to check the value of existing country field and if the new record is inserted with different country value, I need to throw an error. Is there a way to achieve this.? 
Scenario:
1. I have a picklist field (User_List__c) on Account which displays the active users names as picklist values.
2. I want to update the list of active users in the User_List__c picklist field whenever a user is inserted or, when the user updates the name.
3. I have implemented a trigger on User to trigger the changes as per the above conditions.
4. But I am having issues in updating the picklist values.
NOTE :
- I have to update a single picklist value at a time and not all the values when updating the picklist value list.
select id, Name, (Select Id, Name from contacts), (Select Id, Name From Opportunities where Id='Your Opportunity Id') from Account

Thanks in advance
Can any one help me writing the trigger for upating the account rating field to 'hot' when the oppty stage is equal to 'closed won'?

thanks in advance...