Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

CRMScript: Open new window/URL when sale is saved?

Hi

Is it possible from CRMScript in S&M to open a new browser window?

With the new CRMScript in S&M it is possible to create an event "Sales/After save sale".

When this is fired I would like to open a new window - a "custom made" advanced webbased advertisement booking system with the sales id. For the booking system to be able to link to the sale. 

Workflow:
1) [user] Create sale in SuperOffice
-- Enter mandatory sale info like name, company and sale type
2) [user] Click save sale
3) [CRMScript] Open new browserwindow or tab: http://internal-server/webbook/newsale.php?saleid=<said>
(<said> can be set to SaleEntity.SaleId)

4) [user] update advertisement/sale in other system
5) [user] save advertisement/sale in other system
6) [code in other system] update the sale in SuperOffice using REST api

RE: CRMScript: Open new window/URL when sale is saved?

From what I know, you're limited to mostly EventData-related functions.

Things like setVariable("url", "<url>") doesn't work in that setting (yet).

EventData has a function called setNavigateTo(string), which can take you to a section in sales. The input parameter is that of soprotocol i.e. sale.main, diary, etc.

I haven't tried it, but you might be able to work yourself around it by navigating to a webpanel in sales that takes the sale.id as a parameter, then either display your stuff there, or let it have a button to open the external system.

CRMScript for sales is very new though, so this is all good feedback to the team that is working on it, as there are plans to introduce new functionality.

Av: Hans Wilhelmsen 14. okt 2017

RE: CRMScript: Open new window/URL when sale is saved?

Building off of what Hans said - you could perhaps use setNavigateTo to open a browserpanel in SuperOffice, and that browserpanel can display your internal webpage.

Av: Frode Lillerud 15. okt 2017

RE: CRMScript: Open new window/URL when sale is saved?

Hi All,

Has there been any developments to achive this yet.  The ability to open a url a pop up window, passing through the ID of the selected record would be so helpful.

Trevor

Av: Trevor Sharp 12. sep 2018