In DAML, can I save a contractId of B in contract A? I tried the followings but creating contract returns an update and I cannot save that update anywhere or even access to its data.
template OneContract
with
someParty : Party
someText : Text
someNumber : Int
where
signatory someParty
template Main
with
anyone : Party
cid : ContractId OneContract
where
signatory anyone
controller anyone can
nonconsuming CreateOneContracts : ()
with
p : Party
int : Int
do
-- cid is not bind to cid in the contract
cid <- create OneContract with someParty = p, someText = "same",
someNumber = int
-- let won't work since create returns an update
let x = create OneContract with someParty = p, someText = "same",
someNumber = int
pure()