final ISession session = context.getSession(); if (paramObject != null) session.retain(paramObject); The above code is wroking in mendix 6.10.5 but in 7.0.2 it shows error, InStead of ISession.retain() method what we will use in 7.0.2 mendix application,