• Revanth
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Hi I have a vf page which will be redirected when i click the link in opportunity detail page.

 

 

My client has two operating companies which uses the same salesforce application with little changes.

 

Now one opco(operating company) asked the vf page to be on the opportunity detail page instead of a link which will redirect to a vf page and the other opco do not want this.

 

I used to get the inline= true error when i moved the vf page into the detail page, so i used the java script code to make the inline stop and the page will redirect once all the execution is done.

 

Now due to this java script the execution process is so slow that it will take 7 to 10 seconds and if i remove this it will execute in 5ms to 1 sec. Please See the code and suggest me any work around.

 

Vf page: 

 

 

<apex:commandButton value="Save" action="{!saveData}" reRender="redirectSave,Status,MyMessage" status="Status"/>

<apex:outputPanel id="redirectSave">
<apex:outputText rendered="{!shouldRedirect}">
<script type="text/javascript">
window.top.location="{!redirectUrl}";
</script>
</apex:outputText>

 

 

In Controller:

 

 

Public class VView

{

private ApexPages.StandardController Controller;

public Boolean shouldRedirect {public get; public set;}

public machineView2(ApexPages.StandardController controller)

{

this.Controller = Controller;

shouldRedirect = false;

}

public pageReference saveData()

{

shouldRedirect = true; redirectUrl = Controller.view().getUrl(); return null;

}

}

After doing this for both the opcos it will get executed and redirected to the opportunity detail page but it will get executed for 7 to 10 secs.

 

Is there any thing that i need to do to increase the performance of the code(by changing even it it gets executed in 3 to 5 sec it is good).

 

Can any one give suggestions.

 

Thank you,

Revanth Kumar R,

  • September 24, 2013
  • Like
  • 0

Please help me.I need to get the ids of the parend object with a condition in the grandchild object records.

 

note: We should use only one query(can have inner queries) and should not use maps and sets to first get the child records and then get the grandchild records.

 

Thank You 

can we update the grandchild record  in salesforce using apex?

Does anyone know how I can migrate permission sets from the permission set metadata xml file?

Wehave tried using ANT, I have tried migrating using eclipse but getting an error "invalid parameter".

Please help me.I need to get the ids of the parend object with a condition in the grandchild object records.

 

note: We should use only one query(can have inner queries) and should not use maps and sets to first get the child records and then get the grandchild records.

 

Thank You 

can we update the grandchild record  in salesforce using apex?