Catalyzes both the synthesis of cyclic ADP-beta-D-ribose (cADPR) from NAD(+), and its hydrolysis to ADP-D-ribose (ADPR) (PubMed:7805847). Cyclic ADPR is known to serve as an endogenous second messenger that elicits calcium release from intracellular stores, and thus regulates the mobilization of intracellular calcium (Probable). May be involved in pre-B-cell growth (Probable).