Skip to main content
Joel Kikkert (Virtualsa) 님이 #Visualforce에 질문했습니다
Hi, 

I want to use a trigger to launch an autolaunched (headless flow). I wrote the trigger but I don't know how to pass the ID I saved in a variable to my flow? I want to do it directly from the trigger without using visualforce. Anybody have any suggestions?

This is my code:

 

trigger deleteServiceLine on Service_Line__c (before delete) {

//to store the id of the record that triggered the flow

String varServiceLineID;

if (Trigger.isDelete) {

//grabs id of the record and stores it in a variable for later use.

varServiceLineID = Trigger.Old[0].Id;

//displays the value that is stored in the variable

System.debug('this is the ID I am fetching is: ' + varServiceLineID);

}

}

 
답변 4개
0/9000