+ Start a Discussion
Antonio ManenteAntonio Manente 

Dynamic sObject problem

I'm creating a quote object dynamically, and everything works fine but I'm stuck trying to assign my lookup relationship to account. I can't find any docs on this and was wondering if anyone has done something similar. Here's an example of what I'm trying to do:
Schema.SObjectType quoType = Schema.getGlobalDescribe().get('quote');
sObject quo = quoType.newSObject();

//This works just fine
quo.put('Email', 'generic@email.com');

//I've tried different variations of this, none seem to work
quo.put('AccountId' , SOME_ID);

quo.put('Account', SOME_ID);

Any help is greatly appreciated, thanks in advance!