You need to sign in to do that
Don't have an account?
TehNrd
How to query isDeleted with apex SOQL?
I know I have to use query all or all rows or something but I can't figure it out. I always get the error: "MALFORMED_QUERY - ALL ROWS not allowed in this context". What does this mean?
I've tried with no luck:
SELECT Id, isDeleted FROM OpportunityLineItem WHERE isDeleted = true All ROWS
SELECT Id, isDeleted FROM OpportunityLineItem WHERE isDeleted = true QUERY ALL
Thanks,
Jason
I've tried with no luck:
SELECT Id, isDeleted FROM OpportunityLineItem WHERE isDeleted = true All ROWS
SELECT Id, isDeleted FROM OpportunityLineItem WHERE isDeleted = true QUERY ALL
Thanks,
Jason
WHERE isDeleted =: true All ROWS
The web service, Ajax, and Apex all support SOQL.
For testing you can use the Force.com develoment tools, http://wiki.apexdevnet.com/index.php/Tools.
I have an Opportunity:
ID: 006R0000002Kpjl
This opp has two oppLines that have not been deleted. I am using the APEX/Soql Explorer to run this query and I get the two lines, and isDeleted = false:
Select Id, IsDeleted, OpportunityId, UnitPrice from OpportunityLineItem where OpportunityId = '006R0000002Kpjl'
I then delete the items and run this again. In the tool there is the options to "Query" and "Query All" no matter what I do I can't get the lines items to return in the results.
Thoughts?
If a opportunity is deleted the child line items are flag as isDeleted but if you delete a line item it is deleted deleted and is not coming back.
-Jason
Just did some more testing and this syntax works fine.
select Id, isDeleted from Contact where AccountID = 'a0750000003erMU' ALL ROWS
FROM Contact
WHERE IsDeleted = true
ALL ROWS
And I too get the following error message: