You need to sign in to do that
Don't have an account?
HNT_Neo
Apex skip dropdown when certain value has been selected
I have an Apex trigger setup to check the Forecast checkbox to true, and updater or insert the Company Name to BPHS.
What should my syntax look like if I don't want this trigger to update a picklist named, License__c with the value of Distribution
I want to keep the syntax I have, but if Distribution is selected, I need the syntax to skip that record.
Here is my current syntax:
Thank you in advance!
What should my syntax look like if I don't want this trigger to update a picklist named, License__c with the value of Distribution
I want to keep the syntax I have, but if Distribution is selected, I need the syntax to skip that record.
Here is my current syntax:
trigger ForceForecasting on User (before update, before insert) { for (User userInLoop : Trigger.new) { userInLoop.ForecastEnabled = true; userInLoop.CompanyName = 'BPHS'; } }
Thank you in advance!
All Answers
As per my understanding, LIcense__c picklist field on the User Object needs to be updated to the value as "Distribution" only if the field value is not "Distribution".
Let me know if you have any queries. Also please mark this answer as best answer if it answers to your question as it may helpful to others.
Regards,
Sai Krishna Tavva
Tavva, I will also take your solution into consideration if a value when the field is Null.