0

After deleting the record, the page should be redirected.This is my code:

 <button class="slds-button slds-button--neutral" id="btnAssetDelete">
      <apex:outputLink value="{!URLFOR($Action.Patent__c.Delete, objAsset.id,[retURL='/apex/AssetDetails'])}" onclick="return window.confirm('Are you sure?');">
          Delete
      </apex:outputLink>
 </button>
0

Can you use apex:commandLink instead of apex:outputLink as follows:

<button class="slds-button slds-button--neutral" id="btnAssetDelete">
      <apex:commandLink action="{!URLFOR($Action.Patent__c.Delete, objAsset.id,[retURL='/apex/AssetDetails'])}" onclick="return window.confirm('Are you sure?');">
          Delete
      </apex:commandLink>
 </button>
  • even though it is not redirecting – salesforce Jul 17 '17 at 16:31
  • do you have controller method? Is so then you can redirect from controller – Santanu Boral Jul 17 '17 at 16:34
  • or you can use oncomplete function for redirection – Santanu Boral Jul 17 '17 at 16:35
  • yes ,is there.i tried not redirecting – salesforce Jul 17 '17 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.