Use a possessive pronoun with a gerund.
I didn’t like him going alone
I didn’t like his going alone.
(possessive pronoun/his – gerund/going)They insisted on me resigning the post.
They insisted on my resigning the post.
(possessive pronoun/my – gerund/ resigning)We love the idea of them building a new house.
We love the idea of their building a new house.
(possessive pronoun/their – gerund/ building)