I am new to Salesforce development (apologies in advance for not knowing all the Salesforce jargon) and I am trying to build a lightning component that will read fields from a record, add the values as arguments to a URL for use in calling a custom API and then write the response from the API call back to the record in a specific field.
I have managed to find all the info I needed through the Salesforce development forums to get the reading fields working (I used the force:recordData functionality) and I have setup the code for the HTTP call and the response is correct (I have struggled through the asynchronous JavaScript code and found a solution that is compatible with my API). But now I am now stuck at the last hurdle of trying to get the response into a specific field in the record. I have worked through the Force:editRecord documentation and it appears like it only works for manual editing with a pop-up window where a user can change information and save it to the record. I have tried many ways to set the value of the "recordData field" from the JavaScript Controller but I have not been able to find a working solution and I am beginning to think it might not be possible.
Is there a way to use Force:editRecord (or a similar lightning function) to take the HTTP response (String) and add it to a specific field in the record?
Any info would be greatly appreciated. I would be more than happy if you could just point me in the right direction.
Many thanks, Vince
P.S. Up until now I've managed to stay clear of Apex but I am willing to take the time to learn how to use it if there is no other way to do this