You need to sign in to do that
Don't have an account?
d.tejdeep@nicomatic.in
Lightning Button is not working in salesforce1 app
We have a custom object Quote in that there is a lightning button called "Quote preview LE".where when we click on quote preview button it will open PDF. It is perfectly working on salesforce classic and lightning desktop and it is not working on the salesforce1 mobile app.
Generally, Lightning components should work on salesforce1app.I dont this is strange
This is our ID : 00D90000000bovq
Grant login access on your Org : yes
Component :
I tried with the formulae field which is not working as well with a hyperlink URL
Generally, Lightning components should work on salesforce1app.I dont this is strange
This is our ID : 00D90000000bovq
Grant login access on your Org : yes
Component :
<aura:component implements="force:lightningQuickAction,force:hasRecordId" controller="Quote_Preview_LE"> <style> .forceChatterLightComponent .bodyWrapper{height:0%;width:0%;padding:0;box-sizing:border-box} .slds-modal__close{height:0%;width:0;padding:0;display:none;} </style> <aura:attribute name="ProfileId" type="String"/> <aura:handler name="init" action="{!c.CheckPreview}" value="{!this}" /> <aura:attribute name="quo" type="Quote__c" default="{'sobjectType': 'Quote__c'}" /> </aura:component>controller :
({ CheckPreview : function(component, event, helper){ var qid=component.get("v.recordId"); //alert(qid); var action = component.get("c.getquoteid"); action.setParams({ "recordId" : qid }); action.setCallback(this, function(a) { parent.location.href =parent.location.href; window.open("/apex/QuotePreview?id="+qid,"_blank"); }); $A.get("e.force:closeQuickAction").fire() $A.enqueueAction(action); } })quote preview is a pdf page. It is opening in classic and lightning desktop.
I tried with the formulae field which is not working as well with a hyperlink URL
This knowledge article Open a PDF with Salesforce for Android and iOS app https://help.salesforce.com/articleView?id=000268447&language=en_US&type=1 says: plus using the e.force:navigateToSObject event to open the PDF.
Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra