| | |
| | | FileAddress__c file = new FileAddress__c(); |
| | | PIHelper.PIIntegration pI=PIHelper.getPIIntegrationInfo('Document'); |
| | | file.DownloadLink__c =pI.undeleteUrl+key+'&fileName='+fileName; |
| | | file.DownloadLink2__c =pI.undeleteUrl+key+'&fileName='+fileName; |
| | | file.FileName__c =fileName; |
| | | file.ViewLink__c =pI.queryUrl+key; |
| | | file.ParentRecordId__c =parentId; |
| | |
| | | |
| | | public static List<FileAddress__c> getFileds(String parentId){ |
| | | if(String.isNotBlank(parentId)){ |
| | | return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,DownloadLink2__c,FileAddress__c.ViewLink__c FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc]; |
| | | return [SELECT Id,ParentRecordId__c, FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c FROM FileAddress__c where ParentRecordId__c=:parentId order by createddate desc]; |
| | | } |
| | | return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,DownloadLink2__c,FileAddress__c.ViewLink__c FROM FileAddress__c order by createddate desc limit 100]; |
| | | return [SELECT Id, ParentRecordId__c,FileName__c,DownloadLink__c,FileAddress__c.ViewLink__c FROM FileAddress__c order by createddate desc limit 100]; |
| | | } |
| | | } |