How to Run Localhost in Salesforce

There are two ways to run localhost in Salesforce:

By Changing SRC in iFrame Manually

  1. Start localhost (pricefx-sfdc-canvas & pricefx-modules).

  2. Open iFrame in Salesforce which is connected to the localhost.

  3. In Developer Tools find iFrame and add an attribute:

    src="http://localhost:3000/#/"

     

     

By Appending SRC Using JavaScript Code in Console

  1. Start localhost pricefx-modules.

  2. Open iFrame in Salesforce which is connected to the localhost.

  3. Select Outer Pricefx Canvas.

     

  4. Execute this code in the console:

    const allIframes = document.querySelectorAll('iframe'); if (allIframes.length > 0) { const firstIframe = allIframes[0]; firstIframe.src = 'http://localhost:3000/#/'; console.log('Updated src:', firstIframe.src); } else { console.error('No iframes found on the page.'); }

Found an issue in documentation? Write to us.

 
Pricefx version 13.1