You need to sign in to do that
Don't have an account?
![Marketing Marketing 27 Marketing Marketing 27](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Rerender on save button causing a "Refused to Connect" Error. Help!
This is the 2nd post I've made about this issue with the ReRender Attribute.
My page is using the opportunity standard controller and has an extension with the below Save method I am calling from my commandButton
my save button looks like the below:
When I exit out of the page, I see that the new opportunity was inserted and everything worked fine, however, ever since I added the Rerender attribute, my save method can no longer navigate to the new opportunity without getting this error.
What am I doing wrong??
My page is using the opportunity standard controller and has an extension with the below Save method I am calling from my commandButton
public PageReference Save(){ try{ insert TD2nd; TD1st.X504_Related_Opportunity__c = TD2nd.Id; update TD1st; return new Pagereference('https://company--sandboxname.sandbox.lightning.force.com/lightning/r/Opportunity/' + TD2nd.Id +'/view'); } catch(DmlException d){ Apexpages.addMessages(d); return NULL; } }
my save button looks like the below:
<apex:pagemessages id="msgs2"/> <div align="center"> <apex:commandButton action="{!Cancel}" value="Cancel"/> <apex:commandButton action="{!Save}" value="Save" reRender="msgs, msgs2"/> </div>I put in the ReRender attribute so that if the user gets validation rules, they won't lost their work. However, when there are no validation rules and the save method executes, I get a grey page with a "Refused to Connect" error message.
When I exit out of the page, I see that the new opportunity was inserted and everything worked fine, however, ever since I added the Rerender attribute, my save method can no longer navigate to the new opportunity without getting this error.
What am I doing wrong??
Connection refused means that the port you are trying to connect to is not actually open. So either you are connecting to the wrong IP address, or to the wrong port, or the server is listening on the wrong port, or is not actually running.
https://www.mcdvoice.guru/