0
ちょっとクラスを作成していて、このコンストラクタが定義されていないエラーが発生しています。私は別のクラス内にクラスを持っており、各クラスエレメントにフィールドを割り当てる作業を始める前に、すべてのクエリを実行しています。Salesforce Apexコンストラクタが定義されていませんエラー
最後にinner forループ内にapprovalQuoteLineWrapperクラスを作成するときにエラーは発生しません。しかし、私がapprovalQuoteWrapperを構築しようとすると、このエラーが発生します。
[CustomApprovalsHomeComponentController.approvalQuoteWrapper](Id、Id、Id、Id、コラム:23)
ここでは私のコードです:
public with sharing class CustomApprovalsHomeComponentController {
public class approvalQuoteLineWrapper{
public approvalQuoteLineWrapper(Id quoteLineId, Id productId, String productName, Decimal listPrice, Decimal discountPercentage, Decimal netPrice, Decimal quantity, Decimal extendedPrice){
this.quoteLineId = quoteLineId;
this.productId = productId;
this.productName = productName;
this.listPrice = listPrice;
this.discountPercentage = discountPercentage;
this.netPrice = netPrice;
this.quantity = quantity;
this.extendedPrice = extendedPrice;
}
public Id quoteLineId {get;set;}
public Id productId {get;set;}
public String productName {get;set;}
public Decimal listPrice {get;set;}
public Decimal discountPercentage {get;set;}
public Decimal netPrice {get;set;}
public Decimal quantity {get;set;}
public Decimal extendedPrice {get;set;}
}
public class approvalQuoteWrapper{
public approvalQuoteWrapper(Id approvalId, Id quoteId, Id opportunityId, Id approverId, Id accountId, Id ownerId, String paymentTerms, String billingFreq, String quoteStatus, String oppType, String approvalStatus, String accountName, Date quoteCreateDate, Decimal totalDiscount, List<approvalQuoteLineWrapper> quoteLineList){
this.approvalId = approvalId;
this.quoteId = quoteId;
this.opportunityId = opportunityId;
this.approverId = approverId;
this.accountId = accountId;
this.ownerId = ownerId;
this.paymentTerms = paymentTerms;
this.billingFreq = billingFreq;
this.quoteStatus = quoteStatus;
this.oppType = oppType;
this.approvalStatus = approvalStatus;
this.accountName = accountName;
this.quoteCreateDate = quoteCreateDate;
this.totalDiscount = totalDiscount;
this.quoteLineList = quoteLineList;
}
public Id approvalId {get;set;}
public Id quoteId {get;set;}
public Id opportunityId {get;set;}
public Id approverId {get;set;}
public Id accountId {get;set;}
public Id ownerId {get;set;}
public String paymentTerms {get;set;}
public String billingFreq {get;set;}
public String quoteStatus {get;set;}
public String oppType {get;set;}
public String approvalStatus {get;set;}
public String accountName {get;set;}
public Date quoteCreateDate {get;set;}
public Decimal totalDiscount {get;set;}
public List<approvalQuoteLineWrapper> quoteLineList {get;set;}
}
public List<approvalQuoteWrapper> itemsToApprove {get;set;}
public CustomApprovalsHomeComponentController(){
Map<Id, sbaa__Approval__c> approvalList = new Map<Id, sbaa__Approval__c>();
itemsToApprove = new List<approvalQuoteWrapper>();
for(sbaa__Approval__c items : [SELECT Id, sbaa__Approver__r.sbaa__User__c, Quote__c, sbaa__Status__c
FROM sbaa__Approval__c
WHERE sbaa__Approver__r.sbaa__User__c = :UserInfo.getUserID()])
{
approvalList.put(items.Quote__c, items);
}
List<SBQQ__Quote__c> quoteList = [SELECT Id, SBQQ__Account__c, SBQQ__Account__r.Name, SBQQ__Opportunity2__c, SBQQ__Opportunity2__r.Type, ApprovalStatus__c, CreatedDate, SBQQ__TotalCustomerDiscountAmount__c, OwnerId, SBQQ__PaymentTerms__c, SBQQ__BillingFrequency__c
FROM SBQQ__Quote__c
WHERE Id IN :approvalList.keySet()
AND ApprovalStatus__c = 'Pending'
ORDER BY CreatedDate DESC];
List<SBQQ__QuoteLine__c> quoteLineList = [SELECT Id, SBQQ__Product__c, SBQQ__Product__r.Name, SBQQ__ListPrice__c, SBCF_Approval_Discount__c, SBQQ__NetPrice__c, SBQQ__Quantity__c, SBCF_Price_per_user__c, SBQQ__Quote__c
FROM SBQQ__QuoteLine__c
WHERE SBQQ__Quote__c IN :approvalList.keySet()];
for(SBQQ__Quote__c quote : quoteList){
List<approvalQuoteLineWrapper> appQLineList = new List<approvalQuoteLineWrapper>();
for(SBQQ__QuoteLine__c quoteLine : quoteLineList){
if(quoteLine.SBQQ__Quote__c == quote.Id){
appQLineList.add(new approvalQuoteLineWrapper(
quoteLine.Id,
quoteLine.SBQQ__Product__c,
quoteLine.SBQQ__Product__r.Name,
quoteLine.SBQQ__ListPrice__c,
quoteLine.SBCF_Approval_Discount__c,
quoteLine.SBQQ__NetPrice__c,
quoteLine.SBQQ__Quantity__c,
quoteLine.SBCF_Price_per_user__c));
}
}
itemsToApprove.add(new approvalQuoteWrapper(
approvalList.get(quote.Id).Id,
quote.Id,
quote.SBQQ__Opportunity2__c,
approvalList.get(quote.Id).sbaa__Approver__r.sbaa__User__c,
quote.SBQQ__Account__c,
quote.OwnerId,
quote.SBQQ__PaymentTerms__c,
quote.SBQQ__BillingFrequency__c,
quote.ApprovalStatus__c,
quote.SBQQ__Opportunity2__r.Type,
approvalList.get(quote.Id).sbaa__Status__c,
quote.SBQQ__Account__r.Name,
quote.CreatedDate,
quote.SBQQ__TotalCustomerDiscountAmount__c,
appQLineList));
}
}
}
ない私が行方不明です何を確認してください。
ありがとうございます!日時
対