1

I have a custom object of Sync Tracking that allows to keep track for Users , when they are doing a sync from their ipad to salesforce. Now I need to write a trigger on that object, Sync Tracking which is a Veeva object. Is that possible? I tried below trigger.

Trigger:

trigger CallSync on Sync_Tracking_vod__c (after insert, after update) {
Set<ID> ids = Trigger.new.keySet();
List<Sync_Tracking_vod__c> SyncTrack= 
            [SELECT  id,Successful_Sync_vod__c
                      FROM Sync_Tracking_vod__c
                     where id =:ids];
}

Error:

Compile Error: Method does not exist or incorrect signature: [LIST].keySet()

3

Simply change your code to:

trigger CallSync on Sync_Tracking_vod__c (after insert, after update) { 
    Set <Id> ids = Trigger.newMap.keySet(); 
    List<Sync_Tracking_vod__c> SyncTrack = [SELECT id,Successful_Sync_vod__c 
                                            FROM Sync_Tracking_vod__c where id IN:ids]; 
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.