You need to sign in to do that
Don't have an account?
suneel.patchipulusu@gmail.com
Small Clarifications
1. Id =: decAccount.id
Question: What '=:' represents?? what does it mean???
2. decAccount = [Select Id, Distributor__c FROM Account WHERE Id =:decAccount.id];
Question : what will insert in to the decAccount ??
I understood llike we are selecting the id, custom object from account then..????
'=:' mean for just we are comparing here..
for inserting purpose we need to write like ,
insert var;
So your using the query for getting already existing records from object , not inserting ok..
Send me your code i will explain about what you did.
prem
All Answers
decAccount = [Select Id, Distributor__c FROM Account WHERE Id =:decAccount.id];
That is wrong code...
The Right one is..
String str='001.........some id';
decAccount = [Select Id, Distributor__c FROM Account WHERE Id =:str];
like this we can write the code...
you understood llike we are selecting the id, custom object from account then
we are getting only one record who is having the id(str='001.........some id') from all Account records.
Otherwise send me full code i will explain that...
Prem
But we inserted a record into "decAccount" Object
So, you will get an ID for the inserted record of the object
Here what I didnt understand is what does '=:' notation mean?? Is it like we comparing or inserting tthe decAccount.id into id or???
Select Id, Distributor__c FROM Account WHERE Id =:decAccount.id
'=:' mean for just we are comparing here..
for inserting purpose we need to write like ,
insert var;
So your using the query for getting already existing records from object , not inserting ok..
Send me your code i will explain about what you did.
prem