Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<id> lstAssetIds= new List<id>();
- lstAssetIds.Add('aaaaaaaaaaaaaaaaa');
- List<Asset_DMSFolder__c> AssetFolders = [select Id,DMS_Folder__r.Name,Asset__r.Name,Asset__r.Id from Asset_DMSFolder__c where Asset__c IN: lstAssetIds];
- AssetFolders[0].DMS_Folder__r.Name = 'renameusingchild';
- update AssetFolders;
- // the above update does not change the folder name to renameusingchild
- System.debug([select Id,DMS_Folder__r.Name,Asset__r.Name,Asset__r.Id from Asset_DMSFolder__c where Asset__c IN: lstAssetIds][0].DMS_Folder__r.Name);
- ContentFolder cf = [select Id from ContentFolder where Id =:AssetFolders[0].DMS_Folder__c ];
- cf.Name = 'testdirectobjupdate';
- update cf;
- System.debug([select Id,DMS_Folder__r.Name,Asset__r.Name,Asset__r.Id from Asset_DMSFolder__c where Asset__c IN: lstAssetIds][0].DMS_Folder__r.Name);
- //the above update works
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement