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
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!