Setting pointer value when creating a record in a collection using the service mapper
I have Accounts collection and Cards collection. Cards collection has a pointer to Accounts called accountId. I went through a few tutorials and I was able to successfully execute the Create Rest Service on Cards with the AccountId pointer populated. I am trying to do the same using the mapping and I am unable to.
On the Add Card page, I have a select box for Accounts that I am populating on load with a key of AccountId and a value of AccountName. On the data tab, I have added the add service for Card, did the mappings on the request tab. I am not sure how/what I need to map to accountId from the page. I tried adding a javascript that does
return '{"collName":"Accounts", "_id": "' + value + '"}'
but that returns a string and accountId is expecting an object since it is a pointer to Accounts collection.
I am sure I am missing something basic. Please help