Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")}
- {!REQUIRESCRIPT("/soap/ajax/16.0/apex.js")}
- var needs = "{!Entry__c.Needs__c}";
- var removal = "{!Entry__c.Removal__c})";
- var Id = "{!Entry__c.Id}";
- var callback = {
- onSuccess: function(decompileResult){
- window.location = '/{!Entry__c.WeekId__c}';
- },
- onFailure: function(decompileResult){
- alert('Delete Action Failed: ' + decompileResult);
- }
- };
- if(needs == 'No'||(needs == 'Yes' && removal !=')'))
- {
- //alert('Please Enter a Authoriser and Unavailability Notes');
- window.parent.location.replace('/apex/DiaryEntryEditPage?retURL='+diarId+'&Id='+diarId+'&r=r&needsReason=No');
- }
- else{
- //alert('Please Enter a Amendment Reason and Unavailability Notes');
- window.parent.location.replace('/apex/DiaryEntryEditPage?retURL='+diarId+'&Id='+diarId+'&r=r&needsReason=Yes');
- }
- if ("{!$Profile.Name}" === "System Administrator") {
- // Your code
- }
Add Comment
Please, Sign In to add comment