Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can add Quik! integration to your Salesforce account by using just the Quik! web services (to generate forms and to display a list of forms to users). The integration will generally take a salesforce.com developer 5 to 15 days to complete depending on the complexity of your user experience. The implementation uses Apex, JavaScript and XML.

Concepts

It's important to understand the framework in which Quik! forms can be displayed and controlled within SalesForce. Since SalesForce has strong control over it's user experience and security, you can't just simply display a Quik! Form Viewer (HTML) in an iFrame.

In addition, you should not use set "HostFormsOnQuik = TRUE" to return a URL to the form as that is not a secure method for display forms within SalesForce. Instead, you need display the entire HTML returned by the Quik! Forms Engine Execute HTML method. 

SalesForce won't allow external references or javascripts to run in an iFrame that is displayed within a typical Lightning or other SalesForce component. Instead, you must display a Visual Force in the iFrame for the Quik! Form to display within. Set the iFrame to the Visual Force page URL and set the Visual Force page with the HTML content. 

Be aware that the styles within the Quik! Form Viewer (HTML) use absolute references to display items. Be sure to allow sufficient size to display the entire Quik! Form.

Program Flow

The basic program flow is as follows:

...

The following class is used to create and post an XML SOAP request and to process the response.
public with sharing class QuikFormHttpUtility {
public static String SendSOAPRequest(string strXML )

System.debug(strXML);
string xml='';
http soap = new http();
Httprequest soap_request = new Httprequest();
Httpresponse soap_response = new Httpresponse();
//soap_request.setEndpoint('https://websvcs.quikforms.com/quikformsenginews/5300/QuikFormsEngine.asmx');
soap_request.setEndpoint('https://websvcs.quikforms.com/quikformsenginews/5300/quikformsengine.asmx');
soap_request.setHeader('SOAPAction','https://websvcs.quikforms.com/quikformsenginews/Execute'); 

soap_request.setMethod('POST');
soap_request.setHeader('Host''websvcs.quikforms.com');
soap_request.setHeader('Content-type''text/xml; charset=utf-8');
soap_request.setHeader('Content-Length''' + strXML.length()); 
soap_request.setTimeout(30000);
soap_request.setBody(strXML); 
try
{
// Send the SOAP request
soap_response = soap.send(soap_request); 
// Process the response
System.Debug(soap_response.getBody());
System.Debug(soap_response.getStatusCode());
System.Debug(soap_response.getStatus());
xml=soap_response.getBody();
return xml;
}
catch(System.CalloutException ex)
{
System.Debug('Exception thrown: ' + ex.getMessage());
throw ex;
}
catch (Exception e)
{
System.Debug('Exception thrown: ' + e.getMessage());
throw e;
}
return xml;
}
}

...