We are creating an INVOICE through Lightning form. Once the cx filled the form and press SAVE button, we are making a REST api call to java application and getting more details like invoice number, id etc and updating the invoice.
in order to save an invoice STANDALONE in salesforce, I am creating some random string values and assigning to invoice number, id and all (to whatever mandatory fields). As I am inserting random string right before callout, I am using @future method to take care of callout section.
As the callout(@future) runs asynchronously, we don't when will the response comes. So, right after pressing SAVE button, I am redirecting the page to another INVOICE lighting page with filled details in it which will have random ID,num etc for now. But, I want to update/show the fields once I got the response without reloading(I am updating the INVOICE with response body details right after callout finishes).
Please let me know if there is a way to reRender those values without reloading the page in LIGHTNING ASAP. (I am sorry that I can not provide you the code as there are multiple components for above mentioned application/configuration)
Thanks a ton.
In other words, refresh only one COMPONENT once I got the response instead of refreshing whole page or if there is a way to do that using AJAX in LIGHTNING please let me know...
Please note that I have already done with everything including callout. I am getting response and doing everything except the reRendering the updated fields without reloading the page. If I reload the page, there are no issues but Please suggest how to reRender the fields or a component without reloading the page..