Newer
Older
import("system.vars");
import("Campaign_lib");

Johannes Hörmann
committed
if (vars.get("$param.BaseContextId_param") == "Person" || vars.get("$param.BaseContextId_param") == "Organisation")
{
// Note: this only works if the BaseContextId_param is also the correct Tablename. If not you have to add a context - tablename mapping somewhere...
// for person / organisation this should work
CampaignUtils.addParticipantsByRowIds(JSON.stringify([JSON.parse(vars.get("$param.ObjectRowId_param"))[0]]), vars.get("$param.BaseContextId_param").toUpperCase());