diff --git a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
index 4fa3ae6..8f5341c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
@@ -215,35 +215,6 @@
       });
     });
 
-    it(`Add ALaCarte vnf where FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS`, () => {
-      cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res) => {
-        cy.setTestApiParamToGR();
-        res.service.serviceHierarchy['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].service.vidNotions.instantiationType = 'ALaCarte';
-        res.service.serviceHierarchy['2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd'].service.inputs = null;
-        res.global['flags'] = {'FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS': true};
-        cy.setReduxState(<any>res);
-        cy.openIframe('app/ui/#/servicePlanning?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd');
-
-        cy.getElementByDataTestsId('node-2017-488_PASQUALE-vPE 0-add-btn').click({force: true}).then(() => {
-          cy.selectDropdownOptionByText('productFamily', 'Emanuel');
-          cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1');
-          cy.selectDropdownOptionByText('lcpRegion', 'foo-name');
-          cy.selectDropdownOptionByText('tenant', 'tenantID');
-          cy.selectPlatformValue(`xxx1`);
-          cy.getElementByDataTestsId('form-set').click({force: true}).then(() => {
-            const vnfMenuBtnDataTestId = 'node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0-menu-btn';
-
-            cy.getElementByDataTestsId(vnfMenuBtnDataTestId).click({force: true}).then(() => {
-              cy.getElementByDataTestsId('context-menu-edit').click({force: true})
-              .getElementByDataTestsId("lineOfBusiness").should('contain', 'zzz1')
-              .getElementByDataTestsId("lcpRegion").should('contain', 'foo-name')
-              .getElementByDataTestsId("tenant").should('contain', 'tenantName')
-            });
-          });
-        })
-      });
-    });
-
     it(`Add ALaCarte VfModule Without LcpRegion Tenant Id And Legacy`, () => {
       addAlacarteVfmoduleByFlag(true, 'redux-a-la-carte-no-lcp-tenant.json');
     });
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
index d82ba36..d589efa 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/sharedControlles/shared.controllers.service.ts
@@ -16,8 +16,6 @@
 import {CheckboxFormControl} from "../../../../models/formControlModels/checkboxFormControl.model";
 import {InputFormControl} from "../../../../models/formControlModels/inputFormControl.model";
 import {NodeModel} from "../../../../models/nodeModel";
-import {LcpRegion} from "../../../../models/lcpRegion";
-import {Tenant} from "../../../../models/tenant";
 import {MultiselectFormControl} from "../../../../models/formControlModels/multiselectFormControl.model";
 import {MultiSelectItem} from "../../../formControls/component/multiselect/multiselect.model";
 
@@ -29,30 +27,6 @@
 
 
   getLineOfBusinessControl = (instance?: any): DropdownFormControl => {
-    return this.getLineOfBusinessControlInternal(undefined, instance);
-  };
-
-  getMultiSelectLineOfBusinessControl = (instance: any, isMultiSelected: boolean): MultiselectFormControl => {
-    return this.getLobMultiselectControl(instance, isMultiSelected);
-  };
-
-  getLineOfBusinessByOwningEntityControl = (instance?: any, serviceId?: string, controls?: FormControlModel[]): DropdownFormControl => {
-    const service = this._store.getState().service.serviceInstance[serviceId];
-    const owningEntityName: string = service.owningEntityName;
-
-    const changeLcpRegionOptionsOnChange = (lineOfBusinessNameParam: string, form: FormGroup) => {
-      form.controls['lcpCloudRegionId'].enable();
-      form.controls['lcpCloudRegionId'].reset();
-      this._basicControlGenerator.getSubscribeInitResult(
-        this._aaiService.getLcpRegionsByOwningEntityAndLineOfBusiness.bind(this, owningEntityName, lineOfBusinessNameParam),
-        controls.find(item => item.controlName === 'lcpCloudRegionId') as DropdownFormControl, form
-      ).subscribe()
-    };
-
-    return this.getLineOfBusinessControlInternal(changeLcpRegionOptionsOnChange, instance);
-  };
-
-  private getLineOfBusinessControlInternal = (onChange: Function, instance?: any): DropdownFormControl  => {
     return new DropdownFormControl({
       type: FormControlType.DROPDOWN,
       controlName: 'lineOfBusiness',
@@ -64,29 +38,18 @@
       value: instance ? instance.lineOfBusiness : null,
       validations: [new ValidatorModel(ValidatorOptions.required, 'is required')],
       onInitSelectedField: ['lineOfBusinessList'],
-      onChange,
       onInit: this._basicControlGenerator.getSubscribeInitResult.bind(null, this._aaiService.getCategoryParameters)
     })
   };
 
+  getMultiSelectLineOfBusinessControl = (instance: any, isMultiSelected: boolean): MultiselectFormControl => {
+    return this.getLobMultiselectControl(instance, isMultiSelected);
+  };
+
   getTenantControl = (serviceId: string, instance?: any): DropdownFormControl => {
     const service = this._store.getState().service.serviceInstance[serviceId];
     const globalCustomerId: string = service.globalSubscriberId;
     const serviceType: string = service.subscriptionServiceType;
-
-    const onInit = instance
-      ? this._basicControlGenerator.getSubscribeInitResult.bind(
-          this._aaiService,
-          this._aaiService.getLcpRegionsAndTenants.bind(this, globalCustomerId, serviceType))
-      : () => {};
-    return this.getTenantControlInternal(onInit, instance);
-  };
-
-  getTenantByLcpRegionControl = (serviceId: string, instance?: any): DropdownFormControl => {
-    return this.getTenantControlInternal(() => {}, instance);
-  };
-
-  private getTenantControlInternal = (onInit: Function, instance?: any): DropdownFormControl => {
     return new DropdownFormControl({
       type: FormControlType.DROPDOWN,
       controlName: 'tenantId',
@@ -98,7 +61,10 @@
       onInitSelectedField: instance ? ['lcpRegionsTenantsMap', instance.lcpCloudRegionId] : null,
       value: instance ? instance.tenantId : null,
       validations: [new ValidatorModel(ValidatorOptions.required, 'is required')],
-      onInit,
+      onInit: instance ? this._basicControlGenerator.getSubscribeInitResult.bind(
+        this._aaiService,
+        this._aaiService.getLcpRegionsAndTenants.bind(this, globalCustomerId, serviceType)) : () => {
+      }
     })
   };
 
@@ -133,70 +99,6 @@
     const service = this._store.getState().service.serviceInstance[serviceId];
     const globalCustomerId: string = service.globalSubscriberId;
     const serviceType: string = service.subscriptionServiceType;
-
-    const onInit = this._basicControlGenerator.getSubscribeInitResult.bind(
-      this._aaiService,
-      this._aaiService.getLcpRegionsAndTenants.bind(this, globalCustomerId, serviceType)
-    );
-
-    const changeTenantsOptionsByServiceTypeOnChange = (
-      (globalCustomerId, serviceType, lcpCloudRegionIdParam) => {
-        if (!_.isNil(globalCustomerId) && !_.isNil(serviceType)) {
-          this._basicControlGenerator.getSubscribeResult.bind(this,
-            this._aaiService.getLcpRegionsAndTenants(globalCustomerId, serviceType)
-            .subscribe(res => this.setTenantsOptions(controls, res.lcpRegionsTenantsMap[lcpCloudRegionIdParam])));
-        }
-
-      }
-    ).bind(this, globalCustomerId, serviceType);
-
-    return this.getLcpRegionControlInternal(instance, controls,
-      false, onInit, ['lcpRegionList'], changeTenantsOptionsByServiceTypeOnChange)
-  };
-
-  getLcpRegionByLineOfBusinessControl = (serviceId: string, instance: any, controls: FormControlModel[]): DropdownFormControl => {
-    const service = this._store.getState().service.serviceInstance[serviceId];
-    const owningEntityName: string = service.owningEntityName;
-
-    const changeTenantsOptions = (controls: FormControlModel[], cloudRegionId, lcpRegionList: LcpRegion[]) => {
-      const lcpRegionOption = (_.isNil(lcpRegionList) || _.isNil(cloudRegionId))
-        ? null : lcpRegionList.find(({id}) => id === cloudRegionId);
-
-      if (!_.isNil(lcpRegionOption)) {
-        this._aaiService.getTenantsByCloudOwnerAndCloudRegionId(lcpRegionOption.cloudOwner, lcpRegionOption.id)
-          .subscribe(res => this.setTenantsOptions(controls, res));
-      }
-    };
-
-    const lcpRegionOptionsList = (controls: FormControlModel[]): LcpRegion[] => {
-      const lcpCloudRegionIdControl = _.isNil(controls)
-        ? null : controls.find(({controlName}) => controlName === 'lcpCloudRegionId');
-
-      return _.isNil(lcpCloudRegionIdControl) ? null : lcpCloudRegionIdControl['options$'];
-    };
-
-    const loadLcpRegionOptionsOnInit = (_.isNil(instance) || _.isNil(instance.lineOfBusiness))
-      ? () => {}
-      : this._basicControlGenerator.getSubscribeInitResult.bind(
-        this, () => {
-          return this._aaiService.getLcpRegionsByOwningEntityAndLineOfBusiness(owningEntityName, instance.lineOfBusiness)
-          .do(res => changeTenantsOptions(controls, instance.lcpCloudRegionId, res));
-        }
-      );
-
-    const changeTenantsOptionsByCloudRegionIdOnChange = (
-      (controls, lcpCloudRegionIdParam) => changeTenantsOptions(controls, lcpCloudRegionIdParam, lcpRegionOptionsList(controls))
-    ).bind(this, controls);
-
-    return this.getLcpRegionControlInternal(instance, controls,
-      _.isNil(instance) || _.isNil(instance.lineOfBusiness),
-      loadLcpRegionOptionsOnInit, null, changeTenantsOptionsByCloudRegionIdOnChange
-      )
-  };
-
-  private getLcpRegionControlInternal = (instance: any, controls: FormControlModel[], isDisabled: boolean,
-                                         onInit: Function, onInitSelectedField: string[], changeTenantsOptionsOnChange: Function
-  ): DropdownFormControl => {
     return new DropdownFormControl({
       type: FormControlType.DROPDOWN,
       controlName: 'lcpCloudRegionId',
@@ -204,19 +106,26 @@
       dataTestId: 'lcpRegion',
       placeHolder: 'Select LCP Region',
       name: "lcpRegion",
-      isDisabled,
+      isDisabled: false,
       value: instance ? instance.lcpCloudRegionId : null,
       validations: [new ValidatorModel(ValidatorOptions.required, 'is required')],
-      onInitSelectedField,
-      onInit,
-
-      onChange: (lcpCloudRegionIdParam: string, form: FormGroup) => {
+      onInitSelectedField: ['lcpRegionList'],
+      onInit: this._basicControlGenerator.getSubscribeInitResult.bind(
+        this._aaiService,
+        this._aaiService.getLcpRegionsAndTenants.bind(this, globalCustomerId, serviceType)),
+      onChange: (param: string, form: FormGroup) => {
         form.controls['tenantId'].enable();
         form.controls['tenantId'].reset();
+        if (!_.isNil(globalCustomerId) && !_.isNil(serviceType)) {
+          this._basicControlGenerator.getSubscribeResult.bind(this, this._aaiService.getLcpRegionsAndTenants(globalCustomerId, serviceType).subscribe(res => {
+            controls.find(item => item.controlName === 'tenantId')['options$'] = res.lcpRegionsTenantsMap[param];
+            if (res.lcpRegionsTenantsMap[param]) {
+              controls.find(item => item.controlName === 'tenantId')['hasEmptyOptions'] = res.lcpRegionsTenantsMap[param].length === 0;
+            }
+          }));
+        }
 
-        changeTenantsOptionsOnChange(lcpCloudRegionIdParam);
-
-        if (Constants.LegacyRegion.MEGA_REGION.indexOf(lcpCloudRegionIdParam) !== -1) {
+        if (Constants.LegacyRegion.MEGA_REGION.indexOf(param) !== -1) {
           form.controls['legacyRegion'].enable();
           controls.find(item => item.controlName === 'legacyRegion').isVisible = true;
 
@@ -230,11 +139,7 @@
     })
   };
 
-  private setTenantsOptions = (controls: FormControlModel[], tenants: Tenant[]) => {
-    const tenantsControl = controls.find(item => item.controlName === 'tenantId');
-    tenantsControl['options$'] = tenants;
-    tenantsControl['hasEmptyOptions'] = tenants && tenants.length === 0;
-  };
+
 
 
   getSDNCControl = (instance: any, checkedByDefault: boolean, extraContents? : object[]): FormControlModel => {
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
index 08afb41..a7fce1d 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.spec.ts
@@ -907,9 +907,7 @@
   }
 }
 
-class MockFeatureFlagsService {
-  getFlagState = () => false;
-}
+class MockFeatureFlagsService {}
 
 describe('VNF Control Generator', () => {
   let injector;
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
index 4b325b2..488df9a 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator.ts
@@ -10,7 +10,6 @@
 import {AppState} from "../../../../store/reducers";
 import * as _ from 'lodash';
 import {SharedControllersService} from "../sharedControlles/shared.controllers.service";
-import {FeatureFlagsService, Features} from "../../../../services/featureFlag/feature-flags.service";
 
 @Injectable()
 export class VnfControlGenerator {
@@ -18,7 +17,6 @@
   constructor(private genericFormService: GenericFormService,
               private _basicControlGenerator: ControlGeneratorUtil,
               private _sharedControllersService : SharedControllersService,
-              private _featureFlagsService: FeatureFlagsService,
               private store: NgRedux<AppState>,
               private http: HttpClient,
               private _aaiService: AaiService,
@@ -70,28 +68,14 @@
     const vnfModel = new VNFModel(this.store.getState().service.serviceHierarchy[serviceId].vnfs[vnfName]);
 
     if (!_.isNil(vnfModel)) {
-      const isMultiSelected =
-        this._featureFlagsService.getFlagState(Features.FLAG_2002_VNF_PLATFORM_MULTI_SELECT);
-      const lcpRegionsByLineOFBusiness =
-        this._featureFlagsService.getFlagState(Features.FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS);
-
+      const flags = this.store.getState().global.flags;
       result.push(this.getInstanceName(vnfInstance, serviceId, vnfName, vnfModel.isEcompGeneratedNaming));
       result.push(this._sharedControllersService.getProductFamilyControl(vnfInstance, result, true));
-
-      if (lcpRegionsByLineOFBusiness) {
-        result.push(this._sharedControllersService.getLineOfBusinessByOwningEntityControl(vnfInstance, serviceId, result));
-        result.push(this._sharedControllersService.getLcpRegionByLineOfBusinessControl(serviceId, vnfInstance, result));
-        result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
-        result.push(this._sharedControllersService.getTenantByLcpRegionControl(serviceId, vnfInstance));
-        result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isMultiSelected));
-      } else {
-        result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
-        result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
-        result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
-        result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, isMultiSelected));
-        result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
-      }
-
+      result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vnfInstance, result));
+      result.push(this._sharedControllersService.getLegacyRegion(vnfInstance));
+      result.push(this._sharedControllersService.getTenantControl(serviceId, vnfInstance));
+      result.push(this._sharedControllersService.getPlatformMultiselectControl(vnfInstance, result, flags['FLAG_2002_VNF_PLATFORM_MULTI_SELECT']));
+      result.push(this._sharedControllersService.getLineOfBusinessControl(vnfInstance));
       result.push(this._sharedControllersService.getRollbackOnFailureControl(vnfInstance));
     }
     return result;
diff --git a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts
index 603ba81..adb7017 100644
--- a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts
+++ b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts
@@ -228,45 +228,6 @@
       cloudRegionId+AaiService.formatCloudOwnerTrailer(cloudOwner) : cloudRegionId;
   };
 
-
-
-
-
-  getLcpRegionsByOwningEntityAndLineOfBusiness = (owningEntityName, lineOfBusinessName): Observable<LcpRegion[]> => {
-    // let pathQuery: string = Constants.Path.AAI_GET_LCP_REGIONS_BY____
-    //   + "?"
-    //   + "owningEntityName=" + owningEntityName
-    //   + "lineOfBusinessName=" + lineOfBusinessName;
-
-    return of([
-      new LcpRegion("foo-id", "foo-name", true, "foo-cloud-owner"),
-      new LcpRegion("foo2-id", "foo2-name", true, "foo2-cloud-owner"),
-    ]);
-  };
-
-
-  getTenantsByCloudOwnerAndCloudRegionId = (cloudOwner, cloudRegionId): Observable<Tenant[]> => {
-    // let pathQuery: string = Constants.Path.AAI_GET_TENANTS_BY____
-    //   + "?"
-    //   + "cloudOwner=" + cloudOwner
-    //   + "&cloudRegionId=" + cloudRegionId;
-
-    return of([
-      new Tenant({
-        tenantID: "tenantID", tenantName: "tenantName",
-        cloudOwner: "cloudOwner", ['is-permitted']: true,
-      }),
-      new Tenant({
-        tenantID: "tenant2ID", tenantName: "tenant2Name",
-        cloudOwner: "cloudOwner", ['is-permitted']: true,
-      }),
-    ])
-  };
-
-
-
-
-
   public static formatCloudOwnerTrailer(cloudOwner: string):string {
     return " ("+ cloudOwner.trim().toLowerCase().replace(/^[^-]*-/, "").toUpperCase() + ")";
   }
diff --git a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
index 2c30d93..5842662 100644
--- a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
+++ b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts
@@ -13,14 +13,12 @@
   FLAG_FLASH_REPLACE_VF_MODULE ='FLAG_FLASH_REPLACE_VF_MODULE',
   FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT ='FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT',
   FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS ='FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS',
-  FLAG_2002_VNF_PLATFORM_MULTI_SELECT= 'FLAG_2002_VNF_PLATFORM_MULTI_SELECT',
   FLAG_2004_INSTANTIATION_STATUS_FILTER ='FLAG_2004_INSTANTIATION_STATUS_FILTER',
   FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE = 'FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE',
   FLAG_2006_VFM_SDNC_PRELOAD_FILES = 'FLAG_2006_VFM_SDNC_PRELOAD_FILES',
   FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO = 'FLAG_MORE_AUDIT_INFO_LINK_ON_AUDIT_INFO',
   FLAG_2004_INSTANTIATION_TEMPLATES_POPUP = 'FLAG_2004_INSTANTIATION_TEMPLATES_POPUP',
   FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY= 'FLAG_2006_USER_PERMISSIONS_BY_OWNING_ENTITY',
-  FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS = 'FLAG_2006_LCP_REGIONS_BY_LINE_OF_BUSINESS',
   FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF = 'FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF',
 }
 
