You need to sign in to do that
Don't have an account?
Bertrand DB
Refresh record page after adding a related record in lightning
Hello,
Using lightning, I noticed that on Opportunity, if I add some products (OpportunityLineItems), the page will automatically refresh just after.
It is very convenient, because it permits to see the updated Amount field.
In my case, I'm not using OpportunityLineItems but I created a custom object for this need "Custom Line Item".
I have a related list on opportunity, where I can add/delete these items. When I do so, it triggers some Apex and update a field on my opportunity.
My issue is that I need to manually refresh the page to see that the field on opportunity was updated.
I would like to achieve:
Using lightning, I noticed that on Opportunity, if I add some products (OpportunityLineItems), the page will automatically refresh just after.
It is very convenient, because it permits to see the updated Amount field.
In my case, I'm not using OpportunityLineItems but I created a custom object for this need "Custom Line Item".
I have a related list on opportunity, where I can add/delete these items. When I do so, it triggers some Apex and update a field on my opportunity.
My issue is that I need to manually refresh the page to see that the field on opportunity was updated.
I would like to achieve:
- On my opportunity, I add/edit a "Custom Line Item" directly from the related list
- A popup opens, I add/edit the line
- I save, and I'm back to the opportunity page
- I need to refresh the page to see that the field is well updated by the Trigger. -> How to automatically refresh the page after I add/edit a "Custom line item" from the opportunity page?
Lightning component : javaScript : ref : http://sfdcmonkey.com/2017/04/16/add-lightning-component-lightning-action/
Thanks, Kindly let us know if it helps you, & close this query by selecting best answer if you got your solution,so this will helps other in future
sfdcMonkey.com
All Answers
Lightning component : javaScript : ref : http://sfdcmonkey.com/2017/04/16/add-lightning-component-lightning-action/
Thanks, Kindly let us know if it helps you, & close this query by selecting best answer if you got your solution,so this will helps other in future
sfdcMonkey.com
Thank you for this suggestion, which actually makes sense. I'll try to implement that.
I am facing the similar issue. I have created a lightning Quick Action button which I need to click manually to refresh the page. May I know the solution to autorfresh the related records?
Thanks in advance.
save : function(component, event) {
var action = component.get("c.apexSave");
action.setCallback(this, function(action) {
$A.get('e.force:refreshView').fire();
});
$A.enqueueAction(action);
}