  The aim of this paper is to study, in the infinite dimensional framework, the
existence and uniqueness for the solution of the following multivalued
generalized backward stochastic differential equation, considered on a random,
possibly infinite, time interval: \[\cases{\displaystyle
-\mathrm{d}Y_t+\partial_y\Psi (t,Y_t)\,\mathrm{d}Q_t\ni\Phi
(t,Y_t,Z_t)\,\mathrm{d}Q_t-Z_t\,\mathrm{d}W_t,\qquad 0\leq t<\tau,\cr
\displaystyle{Y_{\tau}=\eta,}}\] where $\tau$ is a stopping time, $Q$ is a
progressively measurable increasing continuous stochastic process and
$\partial_y\Psi$ is the subdifferential of the convex lower semicontinuous
function $y\longmapsto\Psi (t,y)$. As applications, we obtain from our main
results applied for suitable convex functions, the existence for some backward
stochastic partial differential equations with Dirichlet or Neumann boundary
conditions.
