diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
index efc4fb7..e9d922c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
@@ -83,21 +83,13 @@
 	saveLicenseAgreement(dispatch, {licenseModelId, previousLicenseAgreement, licenseAgreement, version}) {
 		if (previousLicenseAgreement) {
 			return putLicenseAgreement(licenseModelId, previousLicenseAgreement, licenseAgreement, version).then(() => {
-				dispatch({
-					type: licenseAgreementActionTypes.EDIT_LICENSE_AGREEMENT,
-					licenseAgreement
-				});
+				this.fetchLicenseAgreementList(dispatch, {licenseModelId, version});
 			});
 		}
 		else {
-			return postLicenseAgreement(licenseModelId, licenseAgreement, version).then(response => {
-				dispatch({
-					type: licenseAgreementActionTypes.ADD_LICENSE_AGREEMENT,
-					licenseAgreement: {
-						...licenseAgreement,
-						id: response.value
-					}
-				});
+			return postLicenseAgreement(licenseModelId, licenseAgreement, version).then(() => {
+				this.fetchLicenseAgreementList(dispatch, {licenseModelId, version});
+				FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {licenseModelId, version});
 			});
 		}
 	},
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementConstants.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementConstants.js
index 40bef2c..181171d 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementConstants.js
@@ -19,8 +19,6 @@
 
 export const actionTypes = keyMirror({
 	LICENSE_AGREEMENT_LIST_LOADED: null,
-	ADD_LICENSE_AGREEMENT: null,
-	EDIT_LICENSE_AGREEMENT: null,
 	DELETE_LICENSE_AGREEMENT: null,
 
 	licenseAgreementEditor: {
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListReducer.js
index e6a8f34..7d1a5ef 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListReducer.js
@@ -19,11 +19,6 @@
 	switch (action.type) {
 		case licenseAgreementActionTypes.LICENSE_AGREEMENT_LIST_LOADED:
 			return [...action.response.results];
-		case licenseAgreementActionTypes.ADD_LICENSE_AGREEMENT:
-			return [...state, action.licenseAgreement];
-		case licenseAgreementActionTypes.EDIT_LICENSE_AGREEMENT:
-			const indexForEdit = state.findIndex(licenseAgreement => licenseAgreement.id === action.licenseAgreement.id);
-			return [...state.slice(0, indexForEdit), action.licenseAgreement, ...state.slice(indexForEdit + 1)];
 		case licenseAgreementActionTypes.DELETE_LICENSE_AGREEMENT:
 			return state.filter(licenseAgreement => licenseAgreement.id !== action.licenseAgreementId);
 		default:
diff --git a/openecomp-ui/test/licenseModel/licenseAgreement/test.js b/openecomp-ui/test/licenseModel/licenseAgreement/test.js
index 442f7bf..40b60da 100644
--- a/openecomp-ui/test/licenseModel/licenseAgreement/test.js
+++ b/openecomp-ui/test/licenseModel/licenseAgreement/test.js
@@ -93,7 +93,9 @@
 			id: licenseAgreementIdFromResponse
 		});
 		deepFreeze(licenseAgreementAfterAdd);
+		const licenseAgreementList = [licenseAgreementAfterAdd];
 
+		const featureGroupsList = licenseAgreementList.featureGroupsIds;
 		const expectedStore = cloneAndSet(store.getState(), 'licenseModel.licenseAgreement.licenseAgreementList', [licenseAgreementAfterAdd]);
 
 		mockRest.addHandler('post', ({options, data, baseUrl}) => {
@@ -104,7 +106,18 @@
 				value: licenseAgreementIdFromResponse
 			};
 		});
-
+		mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
+			expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/license-agreements`);
+			expect(data).toEqual(undefined);
+			expect(options).toEqual(undefined);
+			return {results: licenseAgreementList};
+		});
+		mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
+			expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups`);
+			expect(data).toEqual(undefined);
+			expect(options).toEqual(undefined);
+			return {results: featureGroupsList};
+		});
 		return LicenseAgreementActionHelper.saveLicenseAgreement(store.dispatch, {
 			licenseAgreement: licenseAgreementToAdd,
 			licenseModelId: LICENSE_MODEL_ID,
@@ -151,7 +164,18 @@
 			expect(data).toEqual(LicenseAgreementPutFactoryRequest);
 			expect(options).toEqual(undefined);
 		});
-
+		mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
+			expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/license-agreements`);
+			expect(data).toEqual(undefined);
+			expect(options).toEqual(undefined);
+			return {results: [licenseAgreementUpdateData]};
+		});
+		mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
+			expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups`);
+			expect(data).toEqual(undefined);
+			expect(options).toEqual(undefined);
+			return {results: newFeatureGroupsIds};
+		});
 		return LicenseAgreementActionHelper.saveLicenseAgreement(store.dispatch, {
 			licenseModelId: LICENSE_MODEL_ID,
 			version,
