You need to sign in to do that
Don't have an account?
Antonio Manente
Dynamic sObject Lookup assignment
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:
Any help is greatly appreciated, thanks in advance!
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!
All Answers