| | |
| | | for(Account_Delay_Apply__c accapp : adaList){ |
| | | if(Trigger.isUpdate && Trigger.isBefore){ |
| | | for(ContentDocument doc : Trigger.New){ |
| | | System.debug('状态1=》' + accapp.Is_Active__c); |
| | | if(accapp.Is_Active__c != '草案中'){ |
| | | doc.addError('非草案中,附件不允许编辑。'); |
| | | |
| | |
| | | if(Trigger.isDelete && Trigger.isBefore){ |
| | | for(ContentDocument doc : Trigger.old){ |
| | | // if(attMap.containsKey(att.ParentID) && accapp.Is_Active__c != '草案中'){ |
| | | System.debug('状态2=》' + accapp.Is_Active__c); |
| | | if(accapp.Is_Active__c != '草案中'){ |
| | | doc.addError('非草案中,附件不允许删除。'); |
| | | |