Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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?'))
- || (!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?')))
- navigateToUrl('/p/process/Submit?retURL=%2F{!Account.Id}&_CONFIRMATIONTOKEN=VmpFPSxNakF4Tnkwd09TMHlORlF3TXpveU9Ub3hNQzR4TVROYSwtTFBMbnZnd1VrNVZFMlV6YzFoTHpHLE5qazROV1pt&id={!Account.Id}','DETAIL','submit');
- {!URLFOR(target, id, [inputs], [no override])}
- public AccountExtensionController(ApexPages.StandardController standardController)
- {
- this.standardController = standardController;
- showHideButton();
- system.debug('Check1');
- }
- public Boolean showHideButton()
- {
- accountId= ApexPages.currentPage().getParameters().get('id');
- hideSubmitForApprovalButton =false;
- system.debug('Check2'+hideSubmitForApprovalButton );
- accountList =[select id, Ownership from account where id =: accountId];
- if(accountList.size()>0)
- {
- if(accountList[0].Ownership == 'Private' || accountList[0].Ownership == 'Subsidiary')
- {
- hideSubmitForApprovalButton=true;
- system.debug('Check3'+hideSubmitForApprovalButton );
- }
- }
- system.debug('Check4'+hideSubmitForApprovalButton );
- return hideSubmitForApprovalButton;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement