You need to sign in to do that
Don't have an account?
sadik Shaik
I have a long text area field on QuoteLineItem object. I want to format the field something like this
I have a long text area field on QuoteLineItem object. I want to format the field something like this
ShippedDate Quanity
02/23/2019 2
02/22/2019 4
I have a trigger something like this
List<QuoteLineItem> QLIShipItems =
[SELECT Id,ShipLineItemValues__c,Customer_Part_Number__c, (SELECT Confirmed_Quantity__c,Request_Confirmed_Date__c FROM Line_Item_Schedules__r)
FROM QuoteLineItem WHERE Id IN :Trigger.New];
system.debug('QLIShipItems==='+QLIShipItems);
// Map<Id, List<Line_Item_Schedule__c>> m = new Map<Id, List<Line_Item_Schedule__c>>();
list<Line_Item_Schedule__c> LineItemScheduls= new List<Line_Item_Schedule__c>();
list<QuoteLineItem> qtsToUpdate = new list<QuoteLineItem>();
for(QuoteLineItem qlI : QLIShipItems ){
if(qli.Line_Item_Schedules__r!=null && !qli.Line_Item_Schedules__r.isEmpty()){
system.debug('LineItemScheduls==='+qli.Line_Item_Schedules__r);
for(Line_Item_Schedule__c lis : qli.Line_Item_Schedules__r ){
LineItemScheduls.add(lis);
qli.ShipLineItemValues__c = string.valueOf(lis.Request_Confirmed_Date__c);
}
qtsToUpdate.add(qlI);
system.debug('eachQtsToUpdate===='+qlI);
}
}
update qtsToUpdate;
}
Need your suggestions. Thanks in advance
ShippedDate Quanity
02/23/2019 2
02/22/2019 4
I have a trigger something like this
List<QuoteLineItem> QLIShipItems =
[SELECT Id,ShipLineItemValues__c,Customer_Part_Number__c, (SELECT Confirmed_Quantity__c,Request_Confirmed_Date__c FROM Line_Item_Schedules__r)
FROM QuoteLineItem WHERE Id IN :Trigger.New];
system.debug('QLIShipItems==='+QLIShipItems);
// Map<Id, List<Line_Item_Schedule__c>> m = new Map<Id, List<Line_Item_Schedule__c>>();
list<Line_Item_Schedule__c> LineItemScheduls= new List<Line_Item_Schedule__c>();
list<QuoteLineItem> qtsToUpdate = new list<QuoteLineItem>();
for(QuoteLineItem qlI : QLIShipItems ){
if(qli.Line_Item_Schedules__r!=null && !qli.Line_Item_Schedules__r.isEmpty()){
system.debug('LineItemScheduls==='+qli.Line_Item_Schedules__r);
for(Line_Item_Schedule__c lis : qli.Line_Item_Schedules__r ){
LineItemScheduls.add(lis);
qli.ShipLineItemValues__c = string.valueOf(lis.Request_Confirmed_Date__c);
}
qtsToUpdate.add(qlI);
system.debug('eachQtsToUpdate===='+qlI);
}
}
update qtsToUpdate;
}
Need your suggestions. Thanks in advance
Raj Vakati
try this