Skip to Content
0
May 01 at 09:56 AM

Not Able to Save the Variants in Variant Management in ui5

37 Views

Hello readers,

I had implemented the Variant Management on my Custom ui5 app,

The same code was working fine before but now suddenly it stops for all the "Post" call of the PersContainer service.


The Code implemented like:

this.oVariant = this.oVariantSet.addVariant(VariantParam.name);

if (this.oVariant) {

this.oVariant.setItemValue("ColumnsVal", JSON.stringify(aColumnsData));

if (VariantParam.def === true) {

this.oVariantSet.setCurrentVariantKey(this.oVariant.getVariantKey());

}

this.oContainer.save().done(function () {

that.oVariantModel.refresh();

sap.m.MessageBox.success("Variant Saved \n");

});

}

},

On Lastly when I created the new variant the new key is saved as currentVariantKey, but this key is not available in my variantSet

image.png

Attachments

image.png (58.6 kB)