force-app/main/default/pages/ConsumApplyBR.page
@@ -52,7 +52,7 @@ var srcNew = getImgBase64(src); src = srcNew.substring(22, srcNew.length); sforce.connection.sessionId = '{!GETSESSIONID()}'; console.log(src); // var record = sforce.connection.query("select id from Attachment where ParentId = \'{!Consum_Apply__c.Id}\' and name = \'BRCode-{!Consum_Apply__c.Name_No__c}\'"); var record = sforce.connection.query("select Id,ContentDocumentId from ContentDocumentLink where LinkedEntityId = \'{!Consum_Apply__c.Id}\'");