You need to sign in to do that
Don't have an account?

Custom Metadata
Hi , I am trying to write a trigger for the following scenario :
I have a custom metadata set named xyz_mdt which has custom field Hub__c(custom field for hubs like state names) and the MasterLabel field contains the corresponding cities.
There is picklist Origin__c field on OpportunityLineItem object which will contain the name of the Hub to be selected by the user. A text field OriginCIty__c will be entered by the user, and based on the corresponding Hub name from the custom metadata, if the entered Origin City doesn't matches Hub, trigger will stop the user to do so, by prompting an error.
Please help!
I have a custom metadata set named xyz_mdt which has custom field Hub__c(custom field for hubs like state names) and the MasterLabel field contains the corresponding cities.
There is picklist Origin__c field on OpportunityLineItem object which will contain the name of the Hub to be selected by the user. A text field OriginCIty__c will be entered by the user, and based on the corresponding Hub name from the custom metadata, if the entered Origin City doesn't matches Hub, trigger will stop the user to do so, by prompting an error.
Please help!
Let me know if it helps.
All Answers
This is for one of the Hubs.
Let me know if it helps.