Which code segment would a developer insert at the XXXXXXXXXXX to - ProProfs Discuss
Topics
Products
Follow Us:

Which code segment would a developer insert at the XXXXXXXXXXX to make the value the class variable SalesTax accessible within the trigger to calculate the productTax? A developer has the following code block: public class PaymentTax {public static decimal SalesTax = 0.0875;} trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) {PaymentTax PayTax = new PaymentTax();decimal ProductTax = ProductCost * XXXXXXXXXXX;}.



A. SalesTax
B. PayTax.SalesTax
C. PaymentTax.SalesTax
D. OpportunityLineItemTngger.SalesTax

This question is part of Salesforce Platform Developer 1
Asked by Wyatt Williams, Last updated: Jan 15, 2020

+ Answer
Request

2 Answers

Hopeman

Hopeman

Answered Feb 19, 2019

PayTax.SalesTax

=>Static field cannot be referenced from a non static context: SalesTax from the type PaymentTax

 

Wyatt Williams

Wyatt Williams

Answered Mar 26, 2018

PaymentTax.SalesTax

####
 

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.