function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vamsi krishna 106vamsi krishna 106 

I want fire a alert when new record is inserted in custom object in the lightning?

When user update a record(update will done by community user).Same record can view by multiple internal  users. whoever is viewing the that record i need to show alert or toaster to those user.

any suggestons.

Vamsikrishna B.
VinayVinay (Salesforce Developers) 
Hi Vamsi,

You can use inline VF page on standard layout and popup alert whenever field is updated.

Below is the same snippet for opportunity.
<apex:page standardController="Opportunity">
<script type ="text/javascript">

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Vinay Kumar
Ayush ShuklaAyush Shukla
You can use Platform Events ( to implement the requirment. Try doing following 
  1. Setup a Platform Event and fire(publish) the event from trigger ( when community user updates the record . 
  2. Suscribe to that platform event in the lightning component ( show a toast when event is received. 
You can go through the documentation mentioned in links above. This should give good idea of using platform events. 
Phantom BlackberryPhantom Blackberry
Great articles thanks for sharing this awesome blogs