Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. if ((Modal.confirm && Modal.confirm('Once you submit this record for approval, you might not be able to edit it or recall it from the approval process depending on your settings. Continue?'))
  2. || (!Modal.confirm && window.confirm('Once you submit this record for approval, you might not be able to edit it or recall it from the approval process depending on your settings. Continue?')))
  3.  
  4. navigateToUrl('/p/process/Submit?retURL=%2F{!Account.Id}&_CONFIRMATIONTOKEN=VmpFPSxNakF4Tnkwd09TMHlORlF3TXpveU9Ub3hNQzR4TVROYSwtTFBMbnZnd1VrNVZFMlV6YzFoTHpHLE5qazROV1pt&id={!Account.Id}','DETAIL','submit');
  5. {!URLFOR(target, id, [inputs], [no override])}
  6.  
  7. public AccountExtensionController(ApexPages.StandardController standardController)
  8. {
  9. this.standardController = standardController;
  10. showHideButton();
  11. system.debug('Check1');
  12. }
  13. public Boolean showHideButton()
  14. {
  15. accountId= ApexPages.currentPage().getParameters().get('id');
  16. hideSubmitForApprovalButton =false;
  17. system.debug('Check2'+hideSubmitForApprovalButton );
  18. accountList =[select id, Ownership from account where id =: accountId];
  19. if(accountList.size()>0)
  20. {
  21. if(accountList[0].Ownership == 'Private' || accountList[0].Ownership == 'Subsidiary')
  22. {
  23. hideSubmitForApprovalButton=true;
  24. system.debug('Check3'+hideSubmitForApprovalButton );
  25. }
  26. }
  27. system.debug('Check4'+hideSubmitForApprovalButton );
  28. return hideSubmitForApprovalButton;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement