简体   繁体   English

如何将API调用的响应从触发器传递到Salesforce中的侧边栏组件?

[英]how to pass response of api call from trigger to sidebar component in salesforce?

I am doing a webservice call in a trigger on Lead object and i need to pass the response back to the frontend ... that is to the sidebar component and the javascript present in it will read the response and act accordingly ... 我正在Lead对象的触发器中进行webservice调用,我需要将响应传递前端...即侧边栏组件,并且其中包含的javascript将读取响应并采取相应的行动...

also is there any way to get the context of page in the sidebar component ....i mean in what page i am ... that is a lead or oppurtunity or account page.... sidebar component has to know this context... 也有任何方法可以在侧边栏组件中获取页面上下文 .....我的意思是我是哪个页面...即潜在客户或机会页面或帐户页面....侧边栏组件必须知道此上下文。 ..

so what i need is 所以我需要的是

  • pass the response from trigger to sidebar component find the page 将响应从触发器传递到侧边栏组件以找到页面
  • context using the sidebar component 使用侧边栏组件的上下文

thanks for you suggestions... 谢谢你的建议...

There isn't a way (that I'm aware of) to pass a response to the UI from a Trigger because Triggers are run as a result of database commands (insert, update, delete, etc.). 没有一种方法(我知道)将触发器的响应传递给UI,因为触发器是作为数据库命令(插入,更新,删除等)运行的结果。 To get data back from a Trigger, you would have to write that data to a record/field then query for it. 要从触发器中获取数据,您必须将该数据写入记录/字段,然后进行查询。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 API 响应从子组件传递到另一个嵌套组件? - How to pass an API response from a child component to another nested component? 将来自 API 调用的自定义响应传递到 fetch() - Pass a custom response from API call into fetch() OpenWeather API,如何将响应从一个响应传递到另一个调用? - OpenWeather API, How do I pass in response from one response to another call? 在 React typescript 中,如何将复选框状态从侧边栏组件传递到 MainContent 组件以刷新页面 - In React typescript how to pass checkbox status from Sidebar component to MainContent component to refresh the page Salesforce Aura 组件,如何将值从闪电:选择传递到 onchange 控制器? - Salesforce Aura component, how to pass value from lightning:select to onchange controller? 如何将多个API调用响应传递给前端和循环 - How to pass multiple API call response to frontend and loop 如何从 API 调用中获取响应 JSON - How to get the response JSON from API call React 组件:需要从 API 响应格式化地址并将其传递给具有复制到剪贴板功能的组件 - React Component: Need to format an address from an API response and pass it to a component with copy to clipboard functionality VueJS - 如何将 Axios 响应数据从父组件传递到子组件? - VueJS - How to pass Axios response data from parent to child component? nodejs,如何从其他函数调用/传递响应 - nodejs, How to call/pass response from other function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM