You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have a Forge app written in React that use the storage API to simulate saving into 2 entities (tables). I need a DC version of the app. The React component (frontend) is fine. The backend is where I'm having troublle, due to my lack of experience in Java.
I know how to execute the POST, GET, etc from React, but am not clear on the Java classes/modules required in the backend. What I'm after is an example of the backend Java Rest API code required to insert a record into an AO entity with say 3 fields. The tutorials only work with a GET for all fields.
Any help would be appreciated
It may not be the best tutorial, because (due to simplicity) it uses a Java Servlet instead of any mature web framework, but your question was about how can I save an ActiveObjects managed entity object?
And for that, see this code snippet: https://developer.atlassian.com/server/framework/atlassian-sdk/getting-started-with-active-objects/#dopost
You just need to call save() in the right context (in a transaction).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.