/** * After Save * @param newRecord new * @param success success * @returnsuccess */ protected override bool AfterSave(bool newRecord, bool success) { if (!success) { return(success); } // Create Contact Interest if (GetAD_User_ID() != 0 && GetR_InterestArea_ID() != 0 && (Is_ValueChanged("AD_User_ID") || Is_ValueChanged("R_InterestArea_ID"))) { MContactInterest ci = MContactInterest.Get(GetCtx(), GetR_InterestArea_ID(), GetAD_User_ID(), true, Get_TrxName()); ci.Save(); // don't subscribe or re-activate } return(true); }
/** Set Subscription info "constructor". * Create inactive Subscription * @param AD_User_ID contact */ public void SetSubscriptionInfo(int AD_User_ID) { _AD_User_ID = AD_User_ID; _ci = MContactInterest.Get(GetCtx(), GetR_InterestArea_ID(), AD_User_ID, false, Get_TrxName()); }