AnsweredAssumed Answered

Delete instance right node from the XML using gel script.

Question asked by RamBandari on Apr 17, 2019
Latest reply on May 2, 2019 by RamBandari

Hi All,


I'm trying to delete the specific instance right using gel script, I have tried the options shared in communities but those are not working .

Below is the xml , where in I'm trying to remove the both nodes with ids odf_cst_xyz_res_creation_edit &odf_cst_xyz_res_creation_view

<InstanceRights >
<Right id="odf_cst_xyz_res_creation_edit">
<InstanceObject id="00000095" name="00000095" type="xyz_res_creation"/>
<Right id="odf_cst_xyz_res_creation_view">
<InstanceObject id="00000095" name="00000095" type="xyz_res_creation"/>


I have tried the below code in gel Script, Please look into this and correct me if i'm doing wrong here.


<gel:set asString="true" select="$result//NikuDataBus/Users/User/InstanceRights/Right[@id='odf_cst_xyz_res_creation_edit']"

<core:set value="${nodeDelete.getParentNode()}" var="parent"/>

<core:set value="${parent.removeChild(nodeDelete)}" var="void"/>



Ram Babu