I made a Trigger for an Object1 that gets Id from Object2. Rather, Object1 entries already have Object2 IDs, but now I need to make a lookup based on it. The Object2 can be any object you want: system or custom. So, how can I write the universal SOQL for my Map? Now I have this one:

```
Map<Id, Object> tMap = new Map<Id, Object>([SELECT Id FROM Object]);

```

My errors are: `Invalid type: Schema.Object` and `Variable does not exist: Id`.
All I need to do this:

```
trigger ToolsObjTrigger on Tool__c (before insert) {
    for(Tool__c t : Trigger.new){
        if(!String.isEmpty(t.textId__c)){
            Id neededId = Id.valueOf(t.textId__c);
            String objectAPIName  = neededId.getSobjectType().getDescribe().name;
            Map<Id, SObject> objectsMap = new Map<Id, SObject>(Database.query('SELECT Id FROM ' + objectAPIName ));      
            if(objectsMap.get(t.textId__c).Id != null && objectAPIName == 'Obj__c'){
                t.Obj__c = objectsMap.get(t.textId__c).Id;
            }  
        }    
    }
}

```