1

Looks like you just need to do two things. First, change the status: record.Status__c = 'Awaiting Approval'; ... component.find('RRLoader')... Next, you can build a Process to submit the record for approval once the status is changed to Awaiting Approval.


1

This happens because the "view state" has to be passed from client to controller. If the page hasn't finished processing the previous transaction, the previous "view state" will still be loaded, thus repeating the action a second time. As stated by rael_kid, the solution is to disable input until the view state is updated. Example: <apex:page controller=...


1

Great to see you're going to learn Lightning Components and ask questions. StackExchange is rather a place where you want to land whenever you get a complicated/unusual issue. To learn Lightning Components I'd suggest you go to through Trailheadx, the best place to learn Salesforce. Here's what you can take a look at to solve your case: Aura Components ...


Only top voted, non community-wiki answers of a minimum length are eligible