diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
index b4c5836..2ff729d 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
@@ -196,7 +196,7 @@
       .toBeUndefined();
   });
 
-  test('openAuditInfoModal should open modal for failed instance', () => {
+  test('openAuditInfoModalInsideIframe should open modal for failed instance', () => {
     jest.spyOn(AuditInfoModalComponent.openInstanceAuditInfoModal, 'next');
 
     let modelInfoServiceMock: ILevelNodeInfo = new VnfModelInfo(null, null,
@@ -339,6 +339,49 @@
       expect(res).toBe(enabled);
     });
 
+
+  const isDiffCustomizationUuidProvider = [
+    ['currentVfModule customizationUuid and customizationUuid vfModuleHierarchy are diff' ,true,  'mDNS 01222020 0', 'mdns012220200..Mdns01222020..base_dns..module-0', '82160e6e-d9c4-45ef-bd19-01573ab11b61'],
+    ['currentVfModule customizationUuid and customizationUuid vfModuleHierarchy are same' , false, 'mDNS 01222020 0', 'mdns012220200..Mdns01222020..base_dns..module-0', 'c9b32003-febc-44e0-a97f-7630fa7fa4a0'],
+    ['vnfHierarchy is not part of the current model' , true, 'VNF_NOT_PART_OF_THE_MODEL', 'mdns012220200..Mdns01222020..base_dns..module-0',  'c9b32003-febc-44e0-a97f-7630fa7fa4a0'],
+    ['vfModuleHierarchy is not part of the current model', true, 'mDNS 01222020 1', 'VFM_NOT_PART_OF_THE_MODEL',  'c9b32003-febc-44e0-a97f-7630fa7fa4a0']];
+
+  each(isDiffCustomizationUuidProvider).test('isDiffCustomizationUuid: when  %s should return %s', (description, expected, vnfModelName, vfModuleModelName, customizationUuid) => {
+    const serviceModelId : string = 'a243da28-c11e-45a8-9f26-0284a9a789bc';
+    spyOn(store, 'getState').and.returnValue({
+      service : {
+        serviceHierarchy : {
+          [serviceModelId] : {
+            vnfs : {
+              [vnfModelName] : {
+                vfModules : {
+                  [vfModuleModelName] : {
+                    customizationUuid : customizationUuid
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    });
+
+    const node = <any>{
+      data:{
+        modelCustomizationId : 'c9b32003-febc-44e0-a97f-7630fa7fa4a0',
+        modelName : vfModuleModelName
+      },
+      parent : {
+        data : {
+          modelName : "mDNS 01222020 0"
+        }
+      }
+    };
+
+    const isDiffCustomizationUuidResponse : boolean = service.isDiffCustomizationUuid(node, serviceModelId);
+    expect(isDiffCustomizationUuidResponse).toEqual(expected);
+  });
+
 });
 
 function getStore() {
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
index d60bbd3..83691cf 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
@@ -208,7 +208,7 @@
    ****************************************************/
   shouldShowUpgrade(node, serviceModelId): boolean {
     if (FeatureFlagsService.getFlagState(Features.FLAG_FLASH_REPLACE_VF_MODULE, this._store) &&
-      this.isThereAnUpdatedLatestVersion(serviceModelId)) {
+      (this.isThereAnUpdatedLatestVersion(serviceModelId)) || this.isDiffCustomizationUuid(node, serviceModelId)) {
       return this.shouldShowButtonGeneric(node, VNFMethods.UPGRADE, serviceModelId);
     }
     else {
@@ -216,7 +216,25 @@
     }
   }
 
-  private isThereAnUpdatedLatestVersion(serviceModelId) : boolean{
+
+  isDiffCustomizationUuid(node, serviceModelId) : boolean {
+    const vfModuleServiceHierarchy =  this.getVfModuleHierarchyThroughParentModelName(node, serviceModelId);
+    if(_.isNil(vfModuleServiceHierarchy)){
+      return true;
+    }
+    return node.data && !_.isNil(vfModuleServiceHierarchy) && vfModuleServiceHierarchy.customizationUuid  && (vfModuleServiceHierarchy.customizationUuid !== node.data.modelCustomizationId);
+  }
+
+  getVfModuleHierarchyThroughParentModelName(node, serviceModelId) {
+    if(node.parent && node.parent.data && node.data){
+      const vnfHierarchy =  this._store.getState().service.serviceHierarchy[serviceModelId].vnfs[node.parent.data.modelName];
+      return vnfHierarchy ? vnfHierarchy.vfModules[node.data.modelName] : null;
+    }
+    return null;
+  }
+
+
+  isThereAnUpdatedLatestVersion(serviceModelId) : boolean{
     let serviceInstance = this.getServiceInstance(serviceModelId);
     return !_.isNil(serviceInstance.latestAvailableVersion) && (Number(serviceInstance.modelInfo.modelVersion) < serviceInstance.latestAvailableVersion);
   }
