[HTTPRequestHandler Runjavascript]How to create javascript code

Hello everyone.

Now I use RunJavaScript Server Action but I don't know how to create javascript code and how can I check the result.

I tried below and run my app in browser but there is no alert in my browser.

If someone know the solution please help me.

possible please sample oml file share me.

Thanks alot.

May Zin Linn wrote:

Hello everyone.

Now I use RunJavaScript Server Action but I don't know how to create javascript code and how can I check the result.

I tried below and run my app in browser but there is no alert in my browser.

If someone know the solution please help me.

possible please sample oml file share me.

Thanks alot.


Hello May Zin Linn,

Can you please explain exactly what you want to achieve with the javascript code.


Thanks,

Nishant Pareek

Thanks everyone reply for me.

Actually the thing I want to do is Combobox onChange event .

I hope you will understand when you see my oml.

I expect the result is the child Combobox value is changed base on the parent Combobox selected.


explanations of my app {I create an app which create data,edit data,delete data from salesforce through outsystems UI.so I use salesforce connector API from forge to connect salesforce and outsystems.The problem is in my outsystems there is no entity becasuse I retrive data from salesforce so I cannot create query for cascating combobox.So I decided to use javascript to solve this problem.}

I so sorry for japanese language.

Thanks .


May Zin Linn wrote:

Thanks everyone reply for me.

Actually the thing I want to do is Combobox onChange event .

I hope you will understand when you see my oml.

I expect the result is the child Combobox value is changed base on the parent Combobox selected.


explanations of my app {I create an app which create data,edit data,delete data from salesforce through outsystems UI.so I use salesforce connector API from forge to connect salesforce and outsystems.The problem is in my outsystems there is no entity becasuse I retrive data from salesforce so I cannot create query for cascating combobox.So I decided to use javascript to solve this problem.}

I so sorry for japanese language.

Thanks .



Try this - on the OnChange action of your parent combo box put an assignment in which assign your selected combo box value then send this as a request to your API from which you will be getting the results of child combo box. Now assign the response from API to a local variable and set this local variable as the source record of your child combo box.

Hope this will work for you.


Thanks,

Nishant Pareek 

May Zin Linn wrote:

Hello everyone.

Now I use RunJavaScript Server Action but I don't know how to create javascript code and how can I check the result.

I tried below and run my app in browser but there is no alert in my browser.

If someone know the solution please help me.

possible please sample oml file share me.

Thanks alot.

You can define your functions at screen level in advanced tab and then call in you screen/server action. you can refer below attached images for the same.

Thanks & Regards

Prajakta Roshankhede

May Zin Linn wrote:

Thanks everyone reply for me.

Actually the thing I want to do is Combobox onChange event .

I hope you will understand when you see my oml.

I expect the result is the child Combobox value is changed base on the parent Combobox selected.


explanations of my app {I create an app which create data,edit data,delete data from salesforce through outsystems UI.so I use salesforce connector API from forge to connect salesforce and outsystems.The problem is in my outsystems there is no entity becasuse I retrive data from salesforce so I cannot create query for cascating combobox.So I decided to use javascript to solve this problem.}

I so sorry for japanese language.

Thanks .


Hello,

So, you have 2 combo box, the second depends the selection of first, right? If yes, you can add a input parameter in the first OnChange Action and refresh - using AjaxRefresh - the second combo box.


Hope to help.


Cheers