How can the developer access the incoming records in the trigger body - ProProfs Discuss
Advertisement

How can the developer access the incoming records in the trigger body (when writing a before insert trigger)?

How can the developer access the incoming records in the trigger body (when writing a before insert trigger)?

Change Image    Delete



Asked by Sonaapurva, Last updated: Dec 18, 2024

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

John Smith

John Smith

John Smith
John Smith

Answered Dec 21, 2016

By accessing the Trigger.new context variable.
upvote 1 downvote
Reply 

L. Gibson

L. Gibson

L. Gibson
L. Gibson, Science Professor

Answered Jun 21, 2018

In Salesforce, you can access incoming records using trigger.new command. Triggers are the command code used in Salesforce to invoke Apex. It enables the developer to perform the necessary actions to Salesforce records before or after any changes.

Triggers can be used to perform update, insert, merge, delete, undelete and upsert operations in Salesforce records. However, there are some rules, considerations, or exceptions when performing operations for trigger context variables, such as trigger.new can’t be deleted, trigger.old can’t be edited, trigger.old and trigger.new can’t be used in any Apex DML operations, and in trigger.new, you can only change the fields using objects before triggers.

upvote downvote
Reply 

f.Brian

f.Brian

f.Brian
F.Brian

Answered Jan 19, 2018

1C Company is a company from Russia that provides and develops computer software systems. Its most popular type of software that is associated with this company is about video games. It uses its own computer language in order for it to work. The Enterprise platform is geared toward businesses in order to use and develop its applications. It uses the Android and iOS systems.

Some of the most popular video games that it publishes includes World War II fighting role playing games as well as Birds of Prey and Battle of Stalingrad. When writing a before insert trigger, the developer can access the incoming records in the trigger body by accessing the trigger.new context variable. This company was created in 1991.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.