+ Start a Discussion
balraj singh 33balraj singh 33 

Edit button not visible for particular profiles when the PROGRAM STATUS filed ='PENDING CLOSE'.Edit button calls another visualforce page ,Code for Edit is as Belo:

<apex:outputPanel id="NewAssessmentscreen">
        <script type="text/javascript">
        function setViewAndEditLink()
{
$("a.actionLink[data-status='Entered in Error'][data-button='Edit']").hide();
$("a.actionLink[data-type='DST'][data-status='Incomplete'][data-button='Edit']").hide();
$("a.actionLink[data-type='DST'][data-status='Not Eligible'][data-button='Edit']").hide();
$("a.actionLink[data-type='DST'][data-status='Discharged'][data-button='Edit']").hide();
$("a.actionLink[data-type='DST'][data-status='Continued'][data-button='Edit']").hide();
$("a.actionLink[data-type='DST'][data-showDischarge='false'][data-button='Discharge DST']").hide();
$("a.actionLink[data-type='DST'][data-showContinued='false'][data-button='Continue DST']").hide();
$("a.actionLink[data-type='DST'][data-showEdit='false'][data-button='Edit']").hide();
/*End*/
//DE87019-UAT : Related List needs formatting fixes /*Start*/
$("a.actionLink[data-button='Edit']").addClass('setBorder');
/*End*/
$("a.actionLink[data-type='Assessment'][data-status='Incomplete'][data-button='Edit']").hide();
$("a.actionLink[data-type='Assessment'][data-status='Completed'][data-esignCheck ='false'][data-button='Edit']").hide();
$("a.actionLink[data-type='Assessment'][data-status='Completed'][data-appStatus ='Approved'][data-esignCheck ='true'][data-button='Edit']").hide();

/*
101 SOQL ERROR REMEDY
if('{!JSENCODE(ProfileName)}' == '{!JSENCODE(ClinicalSupportProfile)}')
*/
//START: DE132997- Clinical Indicators:  Continuing an existing assessment does not save change in answers
$("a.actionLink[data-type='Clinical Indicators'][data-esignCheck ='false'][data-status='Completed'][data-button='Edit']").hide();
$("a.actionLink[data-type='Clinical Indicators'][data-status='Completed'][data-appStatus ='Approved'][data-esignCheck ='true'][data-button='Edit']").hide();
if('{!$Profile.Name}' == '{!JSENCODE(ClinicalSupportProfile)}')
{
$("a.actionLink[data-esignCheck ='true'][data-appStatus='Pending Approval'][data-button='Edit']").hide();
}
$("a.actionLink[data-type='Fall Risk'][data-status='Completed'][data-button='Edit']").hide();
//US713529 : Add Discharge Planning & Instructions to SOAP under Discharge Planning
$("a.actionLink[data-type='Discharge'][data-status='Completed'][data-button='Edit']").hide();
//US713529  ends
//US618562  Add MRA Assessment to SOAP note - Assessment Tab
$("a.actionLink[data-type='Mortality Risk'][data-status='Completed'][data-button='Edit']").hide();
//Bug-Id : 326 /*Start*/
var isPortalUserJS = '{!JSENCODE(IF(isPortalUser,"true","false"))}';
if(isPortalUserJS=='true'){
$("a.actionLink[data-button='Edit']").hide();
}
}