• Eric Goldman 21
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
If you are hitting limits with the Salesforce API, APEX, or SOQL - we are sharing a tool to give you an alternative path.

We've built a real-time sync between Salesforce and any Postgres database — Sequin (https://sequin.io).

It’s like Heroku Connect, but syncs with any Postgres database and is priced to work with projects of any size.

How Sequin syncs Salesforce with your Database
With a couple of clicks, you'll map your Salesforce data to a Postgres database. Then, we'll keep your database in sync in real-time. You can use SQL, you’re favorite ORM, and the frameworks you know to build the features your sales and support teams need.

Here is a 2-minute video (https://www.loom.com/share/2c104bb17dd44efb9af0d2a7f195e92a)of me showing how to set up a sync:

Benefits of building Sequin
With Sequin, you’ll use SQL to work with your Salesforce data. You don’t need to introduce Salesforce-specific frameworks to a project - which makes it harder to build, maintain, and scale. You can skip SOQL, APEX REST queries, or the need to write all the code to manage tokens, API quotas, or missed events.

For instance, if you want to get all the contacts associated with your Apple account you’ll use a classic SELECT and JOIN:
 
SELECT *
FROM contact
JOIN account ON contact.account_id = account.id
WHERE account."name" ilike '%Apple%';

If you are already using a Postgres database for your application data, we can sync to a schema in your existing database - so you can query across all your Salesforce and application data.

When should you try Sequin?
If you are touching the Salesforce API, creating APEX triggers, or learning SOQL syntax — then consider Sequin as an alternative.

You can try it out totally free: https://sequin.io

If you’re curious about how it all works, check out our docs: https://docs.sequin.io/salesforce/reference

We’re looking forward to hearing feedback and answering any questions. We’d like to make this an offering that is really valuable to the Salesforce community!
If you are hitting limits with the Salesforce API, APEX, or SOQL - we are sharing a tool to give you an alternative path.

We've built a real-time sync between Salesforce and any Postgres database — Sequin (https://sequin.io).

It’s like Heroku Connect, but syncs with any Postgres database and is priced to work with projects of any size.

How Sequin syncs Salesforce with your Database
With a couple of clicks, you'll map your Salesforce data to a Postgres database. Then, we'll keep your database in sync in real-time. You can use SQL, you’re favorite ORM, and the frameworks you know to build the features your sales and support teams need.

Here is a 2-minute video (https://www.loom.com/share/2c104bb17dd44efb9af0d2a7f195e92a)of me showing how to set up a sync:

Benefits of building Sequin
With Sequin, you’ll use SQL to work with your Salesforce data. You don’t need to introduce Salesforce-specific frameworks to a project - which makes it harder to build, maintain, and scale. You can skip SOQL, APEX REST queries, or the need to write all the code to manage tokens, API quotas, or missed events.

For instance, if you want to get all the contacts associated with your Apple account you’ll use a classic SELECT and JOIN:
 
SELECT *
FROM contact
JOIN account ON contact.account_id = account.id
WHERE account."name" ilike '%Apple%';

If you are already using a Postgres database for your application data, we can sync to a schema in your existing database - so you can query across all your Salesforce and application data.

When should you try Sequin?
If you are touching the Salesforce API, creating APEX triggers, or learning SOQL syntax — then consider Sequin as an alternative.

You can try it out totally free: https://sequin.io

If you’re curious about how it all works, check out our docs: https://docs.sequin.io/salesforce/reference

We’re looking forward to hearing feedback and answering any questions. We’d like to make this an offering that is really valuable to the Salesforce community!

Hello!
I am very new to both Salesforce and Apex, so go easy on me!

I am trying to create an Apex trigger, which creates a Contact record and automatically populates some of the fields, when someone creates a User with '@companyname.com' in the email address.

I was able to do this with Process Builder somewhat, however the only field I can't seem to populate that way, is the Account Name.  So I'm attempting to do it in Apex, though my programming knowledge is limited to Python and HTML.  Here is the code I was able to piece together, which unfortunately is still very much a rough draft.

trigger NewContactOnUser on User (after insert) {
    List<Contact> Contact_List = new List<Contact>();
    for (User New_User: trigger.new){
       
        //Conditional statement to check if new contact has @companyname.com in email field
        Contact contact_variable = new_contact();
        String new_contact_string = contact_variable.emailvalue__c;
        if (new_contact_string.contains('@companyname.com')){
  
         Contact New_Contact = new.Contact();
         New_Contact.FirstName = New_User.FirstName;
         New_Contact.LastName = New_User.LastName;
         New_Contact.Email = New_User.Email;
                contacts.add(New_Contact);
        }
    }
    insert Contact_List;
}

So I suppose my question is, how would I eventually get it to populate the Account Name field?  I did '(after insert)' because I think I need the ID for the user after it is created to then get the account name.

 

Thanks for any and all help!