CustomCode Owner Of the Inserted JSON

0 votes
Hi, When I insert a json on customCode service running on cloud, everything works OK except ownerID seems null on dashboard. How can I change ownerID of the JSON object inserted? In client side, it can be done via App42.setLoggedInUser(userName), but customCodeService doesnt allow that. Thanks
asked Oct 24, 2016 in Java by Tufan (64 points)

1 Answer

0 votes

Hi Tufan,


Please use the below code snippet in place of App42.setLoggedInUser(userName), it will set the owner of the document for you:

HashMap<String, String> otherMetaHeaders = new HashMap<String, String>();
otherMetaHeaders.put("loggedInUser", "Your user name");




Himanshu Sharma

answered Oct 24, 2016 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on