| | |
| | | var version = new sforce.SObject("ContentVersion"); |
| | | version = sforce.connection.query("select Id,ContentDocumentId from ContentVersion where ContentDocumentId = \'" + records[0].id + "\'"); |
| | | version = version.getArray("records"); |
| | | if(version[0].Id != "{!Rental_Apply__c.QRId__c}"){ |
| | | if(version[0].Id != "{!Rental_Apply__c.BRId__c}"){ |
| | | var es = new sforce.SObject("Rental_Apply__c"); |
| | | es.Id = "{!Rental_Apply__c.Id}"; |
| | | es.QRId__c = version[0].id; |
| | | es.BRId__c = version[0].Id; |
| | | result = sforce.connection.update([es]); |
| | | } |
| | | } else { |