• Amnon Kruvi
  • NEWBIE
  • 30 Points
  • Member since 2018

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
The requirement is when I insert  records,if  they meets the criteria records should gets updated else they should be inserted.
I have written a trigger on before insert event but what is happening is I am able to update the records but I am not able to stop them from being inserted. Means with update they are also getting inserted. But on update criteria I only want to update the records that are already in Salesforce.
Since a week or so I suddenly get `INVALID_SESSION_ID: Session expired or invalid` errors when trying to deploy to a sandbox. Around the same time, I suddenly started seeing the line `*** Deploying with REST ***` when running an `sfdx force:source:deploy`.

I never used to see my token expire before. Now I have to daily go and re-auth my org connection.

This seems like a regression. What's going on?
The requirement is when I insert  records,if  they meets the criteria records should gets updated else they should be inserted.
I have written a trigger on before insert event but what is happening is I am able to update the records but I am not able to stop them from being inserted. Means with update they are also getting inserted. But on update criteria I only want to update the records that are already in Salesforce.