Skip to content
Snippets Groups Projects
onActionProcess.js 546 B
Newer Older
S.Leipold's avatar
S.Leipold committed
import("system.vars");
import("Campaign_lib");

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());