function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Error in trigger

trigger AddressToAccount on Address__c (after update) {
// This Trigger updates the Case status of the related opportunity//

if(trigger.isafter && trigger.isafter) {
List<Address__c> lstAddress = [SELECT Account__c,Billing_City__C,Billing_State__c,Billing_Country__c FROM Address__c WHERE Account__c IN];
List<Account> lstAccounts= new List<Account>();

for(Address__c ad : {

for(Account ac: lstAccounts) {



// Bulk DML
if(lstAccounts.size() > 0) { update lstAccounts; }



I am getting the following error for the above trigger.

Invalid bind expression type of SOBJECT:Address__c does not match domain of foreign key at line 7 column 139


Please advise.




Is Account__c a vlookup or master/detail field to Account object?

In this SOQL query you are actually trying to compare account id with the custom object Address__c.

Thats why the error.


Also i think "trigger.isafter" is repeated.