Symptom
Resolution
Applies To:
CPQ
Summary:
This article will show you how to Integrate CPQ with the Salesforce1 Mobile application
Details:
SalesForce1 is mobile app for Salesforce. The goal is for CPQ to appear in mobile app.
CPQ can appear in SF1 using Visualforce or Canvas App pages. Currently we are using Visualforce page.
Solution/Workaround:
Adding CPQ to SF1 using Visualforce page
1) Create Visualforce page in Setup/App Setup/Develop/Pages.
”Available for Salesforce mobile apps” should be checked.
In Visualforce markup you can enter
<apex:page standardController="Quote__c" showHeader="true" >
<script>
document.onreadystatechange = function () {
// when document is ready set height and width
setHeight('iframe1');
setWidth('iframe1');
// if window is resized adjust width again to be responsive
window.addEventListener("resize", function () {
setWidth('iframe1');
}, true);
}
function setHeight(id) {
// height is set to full window height
var newHeight = window.innerHeight + "px";
document.getElementById(id).style.height = newHeight;
// if not already set set maxHeight to iframe url so that CPQ sets correct size
if (document.getElementById(id).src.indexOf("maxHeight") === -1) {
document.getElementById(id).src=document.getElementById(id).src + "&maxHeight=" + newHeight;
}
}
function setWidth(id) {
// width is set to full window width
document.getElementById(id).style.width = document.body.clientWidth + "px";
}
</script>
<iframe id="iframe1" scrolling="yes" style="overflow: hidden; border: none;" src="https://sandbox.webcomcpq.com/salesforce/SfLogin.aspx?sfauthUserID={!$User.Username}&apiPartnerURL={!$Api.Partner_Server_URL_290}&apiSessionID={!$Api.Session_ID}&domain_name=Exide&apiPass=Password&action=New&sfqpOpportunityID={!Quote__c.Opportunity__c}" />
</apex:page>
2) Go to Setup/App Setup/Create/Tabs and create new Visualforce tab.
In content pick previously created page.
3) Go to Setup/Administration Setup/Mobile administration/Mobile Navigation and select new tab.
Comments:
References:
Keywords
KBA , CEC-SAL-CPQ , Sales Cloud CPQ , How To