0

I need to create an Order Entry a button that will reside in the Account Object that will:

  1. Copy the Customer Account number (custom field)
  2. paste that value to Notepad and take the user out of Salesforce to an AS400 system.(JDE) The user will already be logged into the AS400 system.
  3. Once at the AS400 I will have a macro take the user to the order entry screen and use the saved Customer Account number. (This is the easier part)

I'm not a developer. We are using Chrome so we can't use Active X. We are using Lightning so I don't know how much Javascript I can use. Not being a developer I of course think it's a pretty simple script to Copy/paste/ALT+TAB to the AS400 and done.

Is this doable?

Thank you

2
  • 2
    Browser-based JavaScript cannot orchestrate the local machine. You can't switch processes (alt-tab) or paste into other applications with JavaScript. That would be an instant drive-by security exploit.
    – David Reed
    Jan 9, 2020 at 17:38
  • 1
    This is not achievable with salesforce functionality
    – Tim Willis
    Jan 9, 2020 at 18:48

2 Answers 2

1

Responding to this older thread in case it might be useful for others or still relevant for the original poster.

It appears the intent is to implement a real time integration between Salesforce and the AS400 based ERP (JDE). If Salesforce information is enough to create the order automatically, then the better approach is to create that order in JDE based on AS400 event behind the scenes. We have integrated Salesforce order entry with AS400 ERPs (including JDE) with the help of Mulesoft middleware - please see more details and the code example here:

https://www.infoviewsystems.com/connect-ibm-i-as400-to-salesforce-with-mulesoft/

If however the user must complete the order entry in JDE as the Salesforce info is not enough for the initial order, here's one way to attack it that we successfully implemented for a high volume call center automation use case:

  1. Agent is logged both into Salesforce and into a custom AS400 screen app that listens for Data Queue events with the message key unique for each active agent
  2. When Salesforce button is clicked or based on any other action, Salesforce sends the event message to AS400 data queue
  3. When message arrives from Salesforce to the data queue, the app will forward to an appropriate AS400 screen and pass the order details received from Salesforce in Data Queue message
  4. Agent continues with order entry on AS400 side

Basically the user experience is: press on Salesforce button (or mark the opportunity closed - won or whatever is the trigger on SFDC side), then switch to AS400 terminal, and there it will already be an order screen pre-filled with SFDC data.

0

This is a very interesting use case.

A draft for a solution I can think of —not proven though— would be to:

  1. Define a Custom Browser Protocol to open AS400 —needs to be done on every terminal you want to use this functionality on
  2. Create a custom lighting component —or VF page—that you will link/embed in your Account Detail page. This component/VF will copy your Account number to the clipboard using javascript like this and then open AS400 using the Custom Browser Protocol from #1

Note: I am assuming you meant clipboard when you mentioned the Macro in AS400 and that you are able to recover the copied value with your Macro.

2
  • Thank you all. I don't believe a Custom Protocol would be practical as we have 350 users. And I don't think I can use Javascript in Lightning. You are correct, I meant clipboard and the macros are already in place to navigate to the proper screen and paste the value in the AS400. I know Tim is probably right but I can't give up. Someone mentioned I might be able to achieve this with .NET. Thank you again. Jan 9, 2020 at 21:16
  • You can use javascript in lightning, what you can't use is javascript buttons.
    – Ideasforce
    Jan 9, 2020 at 22:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .