What is the value of acctscore after this code executes?The account - ProProfs Discuss
Topics
Products
Follow Us:

What is the value of acctscore after this code executes?
The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void process account(){decimal acctscore = acc.rating__c * 100; }

This question is part of Developer I
Asked by Maryolina, Last updated: Jan 28, 2020

+ Answer
Request

3 Answers

Ramesh Somalagari

Ramesh Somalagari, Senior Consultant, B Tech, Bangalore

Answered Jan 26, 2020

Percentage__c value is 50 in the DB.

Account a = [SELECT ID,Percentage__c FROM Account WHERE Id = '0019000000t3nX0AIA'];
Decimal d = a.Percentage__c X 100;
System.debug(' --->=====>'+d);

Out put is 5000

Simply it will multiplythe value.

 

shilpaads

Shilpaads

Answered Nov 08, 2019

5000 is the answer for this

 

maryolina

Maryolina

Answered Jul 01, 2019

500
1
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.