我嘗試在APEX中創建一個觸發器,當自定義sObject的自定義文本字段被產品更新(意味着新產品獲取插入或現有獲取刪除時)。 如何在APEX中將Trigger.Old值與觸發器進行比較?此字段的新值用於啓動觸發器。 這將是這個樣子: Trigger NameOfTrigger on CustomSObject__c (after update){
/*there is already an e
我有兩個完成相同事情的Apex方法。我對框架很陌生,只是想確保我正確地解釋它。 //Method 1:
for (Account a : trigger.new) {
for (Contact c : [SELECT Id, OtherPhone FROM Contact WHERE AccountId= :a.Id]) {
c.OtherPhone= a.Phone; up