• Danny Sk 6
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
 for(WorkOrderLineItem workLine : [select id, workOrderId from workOrderlineItem where workOrderId IN :WorkOrderIds]){
        mapWorkOrderLineItem.put(workLine.workOrderId, workLine);
    Id ProdId = [select Id, Product2Id, Product2.ProductCode from PriceBookEntry where Name = 'Service Fee' and Id = '01u7F000007Xf5XQAS'].Id;
     system.debug('**********Product2Id*********    '+ProdId);
List<ProductConsumed> prodConsumedList = new List<ProductConsumed>();
    if(Trigger.isupdate && trigger.isafter && firstAfterUpdate)
        for(ServiceAppointment svc : [select id, status, Actual_Duration_Hours__c,ParentRecordId from ServiceAppointment where id IN :trigger.new]){
            if(WorkOrderIds.contains(svc.ParentRecordId) && svc.Status =='Completed'){
                system.debug('**********svc1*********    '+svc);
                mapWorkOrderLineItem.get(svc.ParentRecordId).Asset_Title__c='Service Fee';
                    system.debug('**********svc2*********    '+svc);
               ProductConsumed pc = new ProductConsumed();
                pc.QuantityConsumed = svc.Actual_Duration_Hours__c;
                pc.PricebookEntryId = ProdId;
         system.debug('**********svc3*********    ');
             update mapWorkOrderLineItem.values(); 
      insert prodConsumedList;
         system.debug('**********svc4*********    ');
I am new to LWC and cant seem to figure out how to open the source code for LWC. Aura can be opened in the dev console but from what i understand this is not possible with LWC.

Is it possible to open a LWC source code from within the org? I have a LWC that was developed by someone else that needs editing. How can I access the source code?

Hi, I'm trying to get a checkbox ticked where the created date is yesterday except for on a Monday where it would need to be the previous Friday, any help appreciated.