[英]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 所以我需要的是
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.