• #27734
    Salesforce | Aman Aman #4
    Forcetalks

    Unable to see the inserted record without refreshing the detail page of a Salesforce Opportunity

    sforce.one.navigateToSObject(recordId, view) navigating to the record but does not showing the related list record without refreshing the record. I am inserting some opportunity product from a detail page button and then navigating to the opportunity detail page but I am unable to see the inserted record without refreshing the detail page.

     

    #27817
    Salesforce | Manpreet Manpreet #51
    Forcetalks

    Hi Aman,

    It is a known issue to salesforce and possible it will be fixed in next few releases.As an alternative you can do the following :
    VISUALFORCE PAGE :
    ——————-

    <apex:page showHeader=”true” standardController=”Account” extensions=”AccountController” sidebar=”true”>

    <script type=’text/javascript’ src=’/canvas/sdk/js/publisher.js’/>
    <script src=”https://mobile1.t.salesforce.com/soap/ajax/30.0/connection.js” type=”text/javascript” />
    <script>
    function UpdateYourAcc() {
    var accountId = document.getElementById(‘accountId’).value;
    Visualforce.remoting.Manager.invokeAction(
    ‘{!$RemoteAction.AccountController.accountUpdateNumberField}’, accountId,
    function(result, event)
    {
    //if(result!=null) sforce.one.navigateToSObject(result,”detail”);
    Sfdc.canvas.publisher.publish({name: “publisher.close”, payload:{ refresh:”true”}});
    });
    }
    </script>
    <input type=”text” name=”name” id=”accountId” value=”{!viewState.accountId}”/>
    <a href=”#” data-role=”button” class=”updateNotify” id=”sendInvoicesMyself” onclick=”UpdateYourAcc()”>Update Account</a>
    </apex:page>

    Thanks.

    #27893
    Salesforce | Aman Aman #4
    Forcetalks

    Hi Manpreet,

    I have tried the above script. It is not working and and it is making the existing popup blank. Also, using the above script i am unable to navigate to record Detail page. I am using a lightning component inside a visualforce page. Below are some other script that i have tried but none of them work out if you have some other solution, please let me know

    1. $A.get(‘e.force:refreshView’).fire();
    2. window.opener.location.reload(true);
    3. setTimeout(function(){ console.log(‘IntimeOut:::’+Get_getUITheme);window.location.reload(true);
      }, 5000);
    4. window.loadend = refreshParent;
      function refreshParent() {
      console.log(“load event detected!”);
      window.location.reload();
      }
    5. window.location.href = window.location.href;
      window.location.reload(true);

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?