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
nick23464nick23464 

Create a trigger that fires once a contact is acessed

I want to create a custom app that whenever a CRM user accesses one of their contacts it will send a POST request to my external server. Is there a way to do this with just VisualForce or do I need to look into Apex programming.

 

thanks in advance.

 

Puneet SardanaPuneet Sardana

Hi Nick,

 

 

You need to have knowledge of Apex and Visualforce to achieve this.

 

Thanks,

Puneet

nick23464nick23464

Can you tell what Triggers I need to invoke in Apex to send the contact's name via POST to another server once the individual contact's page is loaded? 

Puneet SardanaPuneet Sardana

Hi,

 

Do you want to call server when Contact record is opened? If yes then you have to create a visualforce page. Call a function of controller from visualforce page action. From that function in controller you can make a call to your server.

 

 

Prafull G.Prafull G.
Hi nick,

Follow the step below-
1. Create visualforce page with action attribute
<apex:page standardController="Contact" extensions="MyController" action="{!doCall}">
</apex:page>

2. Create the Controller for this
public class MyController {
public MyController(Apexpages.standardController sc) {
// Get Contact Id here
}
public void doCall () {
// YOUR LOGIC TO CALL EXTERNAL SERVER
}
}

3. Add this vf page as inline on the Contact Page Layout

Let me know if this helps.