You need to sign in to do that
Don't have an account?
SFDC Guest
Use custom meta data picklist values in if condition using apex
Hi All,
I have created custom meta data account_mdt with picklist field "Category", with two picklist values. they are "Avaialbale" and "NotAvailable". I want to use these picklist values in below if condition. plz provide the syntax
if(Account.Type==(here i want to use account_mdt.category.Available value')
{
}
Here, standard object "Account" type is equal to value of custom meta data account_mdt with picklist field "Category" - value=Avaialbale.
I have created custom meta data account_mdt with picklist field "Category", with two picklist values. they are "Avaialbale" and "NotAvailable". I want to use these picklist values in below if condition. plz provide the syntax
if(Account.Type==(here i want to use account_mdt.category.Available value')
{
}
Here, standard object "Account" type is equal to value of custom meta data account_mdt with picklist field "Category" - value=Avaialbale.
another object-contact is having picklist field contacttype with values 'available' & 'nonavailable'.
now if (acctype==contacttype) then do some process.
i want to compare picklist values of two objects.
If i have undesrtood correctly, Please try below.
------------------
if (acctype.equalsIgnoreCase(contacttype)){
// put other code
}
Regards,
Pawan Kumar