You need to sign in to do that
Don't have an account?
Eliezer Augusto Javier Bautista 7
I have a Map with two categories, and I want to add a third one
This if a part of the code where if categories are 'ST' there's a calculation, and if they are 'NS' there's another. I need to make it the following "If the categories = ST or MSF to have the same calculations.
IF(productobj.Categories__c=='ST')
{
strunitprice=productobj.Manual_Cost__c.setScale(2);
system.debug('strunitprice'+strunitprice);
}
ELSE
{
strunitprice=pricebkenryobj.UnitPrice.setScale(2);
}
//Add Percent start
if(productobj.Categories__c=='NS')
{
//Product info
saveERPDataDetail .put('prdname',string.valueOf(productobj.name));
saveERPDataDetail .put('prdunitcost',string.valueOf(untprice));
saveERPDataDetail .put('prdcat',string.valueOf(productobj.Categories__c));
IF(productobj.Categories__c=='ST')
{
strunitprice=productobj.Manual_Cost__c.setScale(2);
system.debug('strunitprice'+strunitprice);
}
ELSE
{
strunitprice=pricebkenryobj.UnitPrice.setScale(2);
}
//Add Percent start
if(productobj.Categories__c=='NS')
{
//Product info
saveERPDataDetail .put('prdname',string.valueOf(productobj.name));
saveERPDataDetail .put('prdunitcost',string.valueOf(untprice));
saveERPDataDetail .put('prdcat',string.valueOf(productobj.Categories__c));
Do you want 2 conditions in the first IF i.e
To make the categories ST or MSF have the same calculations, you can use the following code:
Hope your query is answered.
Please mark it as Best Answer if the above information was helpful.
Thanks.
All Answers
Do you want 2 conditions in the first IF i.e
To make the categories ST or MSF have the same calculations, you can use the following code:
Hope your query is answered.
Please mark it as Best Answer if the above information was helpful.
Thanks.
Worked like a charm