Really need help with this issue: I am trying to populate field Version\_\_c [Lookup(Product)] on QuotLine\_\_c object, whenever New\_Management\_Version\_\_c (checkbox field) on Product object is set to TRUE AND Product Family(another field on Product object) is SOFTWARE. 
But don't know why Version\_\_c is not getting populated.
Also would like to mention here, QuoteLine child object of Product parent object.

Apex Class:

```
public without sharing class QuoteLineManager{
  public static void updateVersion(List<QuoteLine__c> lstQuoteLine){

    List<QuoteLine__c> softwareQlines = new List<QuoteLine__c>();
    List<QuoteLine__c> versionQlines = new List<QuoteLine__c>();

    for(QuoteLine__c ql:lstQuoteLine){
      if(ql.ProductFamily__c == 'Software'){
        softwareQlines.add(ql);
       }
       if(ql.ProductFamily__c == 'Version'){
         versionQlines.add(ql);
       }
    }

    for(QuoteLine__c softQl:softwareQlines){
      for(QuoteLine__c versQl:versionQlines){
        if(versQl.Parent_Product_Name__c == softQl.Parent_Product_Name__c){
           softQl.Version__c = versQl.SBQQ__Product__c;
        }
      }
    }        
  }
}

```

Apex Trigger:

```
trigger QuoteLineBeforeUpdate on QuoteLine__c (before update) {
  List<QuoteLine__c> listQuotelinesNewVersionManagementTrue = new List<QuoteLine__c>();

  // need to verify if the New Version Management is true :
  for (QuoteLine__c ql : Trigger.new) {
    if (ql.ProductFamily__c == 'Software' && ql.Product__r.New_Version_Management__c == true ){
     //if is true I put it in the list
       listQuotelinesNewVersionManagementTrue.add(ql);
     } 
  }
  if (!listQuotelinesNewVersionManagementTrue.isEmpty()){ 
    QuoteLineManager.updateVersion(listQuotelinesNewVersionManagementTrue);
  }
}

```

Please let me know if you didn't get clear picture of issue. Looking forward for positive feedback. Thanks in advance.