- edited description
UPDATE suggested after FOR UPDATE in SOQL Query builder
Hi Scott,
I’m taking a look at SOQL Query builder after the recent fixes.
In the following query, when I position the cursor after FOR UPDATE
and hit Ctrl+Shift, then I get the suggestion UPDATE | TRACKING | VIEWSTAT
. This doesn't happen with FOR VIEW
or FOR REFERENCE
. When trying to force suggestions for those, “No suggestions” pops up.
SELECT Id, Subject
FROM Task
ORDER BY CreatedDate DESC
LIMIT 5
FOR UPDATE
The rest all checks out.
Comments (4)
-
reporter -
repo owner This one is a little tricky because the following is valid:
SELECT Id FROM Account FOR UPDATE UPDATE [TRACKING|VIEWSTAT]
Yes, technically
TRACKING
andVIEWSTAT
should not be offered after theUPDATE
in aFOR UPDATE
clause, but it’s completely valid for you to write one clause after another that’s not yet complete, hence why those are offered. -
repo owner - changed status to resolved
This is working as designed if not necessarily as expected. It ultimately comes down to how completion must work in a situation where there might be incomplete/invalid statements/clauses/etc. preceding the current one and the fact that the same keyword can end one clause and begin a clause that's valid immediately after it.
-
reporter Ah I see, thanks for the clarification. I hadn’t explored the
UPDATE [TRACKING|VIEWSTAT]
clause yet. - Log in to comment