You need to sign in to do that
Don't have an account?
d.tejdeep@nicomatic.in
Error while deploying the trigger urgent solution needed
Error while deploying
Trigger while deploying i am getting the error :
trigger orderreceived on Quote__c (after update,after insert) {
Profile pr = [select id from Profile where name='USA User'];
list<task> ta=new list<task>();
Set<id> QuoteId = new Set<id>();
for(Quote__c q:Trigger.new){
if(UserInfo.getProfileId()==pr.id){
if (q.Order_Received__c!= Null && q.Order_Received__c == true )
QuoteId.add(q.Id);
}
}
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (Integer i = 0; i < tasklist.size(); i++) {
tasklist[i].status='completed';
}
update tasklist;
}
i had used many ways like
way 1:
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (task t: tasklist){
t.status='completed';
tasklist.add(t);
}
update tasklist;
}
way2:
list<task> ta=new list<task>();
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (task t: tasklist){
t.status='completed';
ta.add(t);
}
update ta;
}
I am getting error as while deploying as s
TestQuotelineitem_France_Edit.testMethod1() Class 413 Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace: "Class.Quotelineitem_France_Edit.InfoWithoutAccNum: line 413, column 1 Class.Quotelineitem_France_Edit.france: line 390, column 1 Class.TestQuotelineitem_France_Edit.testMethod1: line 77, column 1"
TestQuotelineitem_IBC.testMethod1() Class 6 Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace: "Class.asyncApex.processAccounts: line 6, column 1 Trigger.quotepotential: line 12, column 1"
Trigger while deploying i am getting the error :
trigger orderreceived on Quote__c (after update,after insert) {
Profile pr = [select id from Profile where name='USA User'];
list<task> ta=new list<task>();
Set<id> QuoteId = new Set<id>();
for(Quote__c q:Trigger.new){
if(UserInfo.getProfileId()==pr.id){
if (q.Order_Received__c!= Null && q.Order_Received__c == true )
QuoteId.add(q.Id);
}
}
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (Integer i = 0; i < tasklist.size(); i++) {
tasklist[i].status='completed';
}
update tasklist;
}
i had used many ways like
way 1:
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (task t: tasklist){
t.status='completed';
tasklist.add(t);
}
update tasklist;
}
way2:
list<task> ta=new list<task>();
list<task> tasklist=[SELECT Id,whatId,whoid FROM Task where whatid=:Quoteid ];
for (task t: tasklist){
t.status='completed';
ta.add(t);
}
update ta;
}
I am getting error as while deploying as s
TestQuotelineitem_France_Edit.testMethod1() Class 413 Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace: "Class.Quotelineitem_France_Edit.InfoWithoutAccNum: line 413, column 1 Class.Quotelineitem_France_Edit.france: line 390, column 1 Class.TestQuotelineitem_France_Edit.testMethod1: line 77, column 1"
TestQuotelineitem_IBC.testMethod1() Class 6 Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace: "Class.asyncApex.processAccounts: line 6, column 1 Trigger.quotepotential: line 12, column 1"
Try adding a list instead of a single SObject on th e below line,
Profile pr = [select id from Profile where name='USA User'];
If that does not solve, reply with the line in this code is the error throwing?
Regards,
Ashish