Forum Discussion
angela
5 years agoCatalyst II
Probably an issue with the id of your target Item. When you want to use an Action in a grid AND relationship grid, you have to differentiate this in your Method. There are a couple of ways to do this. This is one of them:
var myId = null;
var myItem = null;
// Determine if Action was called from main grid or relationship grid
var relatedId = this.getProperty("related_id","");
// relatedId only exists when Action is called from relationship grid
if (relatedId)
{
myId = relatedId;
myItem = this.getPropertyItem("related_id");
}
else
{
myId = this.getID();
lytem = this;
}