Cov txheej txheem:

Dab tsi yog qhov apex trigger?
Dab tsi yog qhov apex trigger?

Video: Dab tsi yog qhov apex trigger?

Video: Dab tsi yog qhov apex trigger?
Video: Yog hmoov dab tsi - Gao Nou Kue ft. Mang Vang (Official Music Video) New song 2020 2024, Kaum ib hlis
Anonim

Apex ua rau pab kom koj ua kev cai ua ua ntej lossis tom qab hloov pauv rau Salesforce cov ntaub ntawv, xws li kev ntxig, hloov tshiab, lossis tshem tawm. A ua rau yog Apex code uas executes ua ntej los yog tom qab cov nram qab no hom kev khiav hauj lwm: ntxig. hloov tshiab. rho tawm.

Hauv txoj kev no, Salesforce Apex yog dab tsi?

Apex ua rau pab kom koj ua cov kev cai ua ua ntej lossis tom qab cov xwm txheej los sau rau hauv Salesforce , xws li ntxig, hloov tshiab, lossis tshem tawm. Ua rau tuaj yeem txhais tau rau cov khoom siv qib siab tshaj plaws, xws li Account lossis Tiv tauj, cov khoom siv, thiab qee yam khoom siv me nyuam. Ua rau yog active los ntawm lub neej ntawd thaum tsim.

Tom qab ntawd, lo lus nug yog, dab tsi yog ob txoj kev xaiv rau thaum Apex triggers tuaj yeem khiav? Apex Triggers tuaj yeem ua tau los yog khiav ua ntej cov ntaub ntawv tau txais kev cawmdim tom qab. Ib qho ua ntej ua haujlwm feem ntau yog siv los txheeb xyuas cov ntaub ntawv uas yuav muab tso rau, thiab tom qab ua rau yog siv los nkag tau cov ntaub ntawv uas yav tas los tau nkag los ntawm tus neeg siv lossis qhov system.

Tsuas yog li ntawd, koj sau Apex txhais li cas?

Tsim ib qho Apex Trigger

  1. Los ntawm kev teeb tsa, xaiv Customize thiab tom qab ntawd nyem qhov khoom uas koj xav ntxiv qhov ua rau.
  2. Nyem Triggers thiab ces nias Tshiab.
  3. Txhawm rau txheeb xyuas koj qhov tshwm sim, nkag mus rau Apex code zoo ib yam li cov qauv no.
  4. Nco ntsoov tias Is Active raug xaiv.
  5. Nyem Txuag.

Dab tsi yog qhov sib txawv ntawm ua ntej thiab tom qab ua tiav?

Ua ntej ua yog siv los hloov kho lossis validate cov ntaub ntawv muaj nuj nqis ua ntej lawv nyob nraum khaws cia rau hauv lub database. Tom qab ua yog siv los nkag mus rau cov nqi teb uas tau teeb tsa los ntawm lub kaw lus (xws li cov ntaub ntawv ID lossis LastModifiedDate teb), thiab ua rau muaj kev hloov pauv hauv lwm cov ntaub ntawv. Cov ntaub ntawv uas tua hluav taws tom qab trigger nyeem nkaus xwb.

Pom zoo: