-
ChatterFeed
-
0Best Answers
-
2Likes Received
-
1Likes Given
-
2Questions
-
2Replies
Quering for ProcessInstanceHistory records in test class gives no results
[ select id, status, lastmodifieddate,lastmodifiedby.Name, isdeleted,createddate , createdby.Name, targetobjectId , (select Id, IsPending, ProcessInstanceId , TargetObjectId , StepStatus, OriginalActor.Name , Actor.Name , RemindersSent from StepsAndWorkItems order by createdDate desc, stepstatus asc) from ProcessInstance where TargetObjectId =:testRec.Id ]
the problem is the testRec was succesfully submitted for approval and the ProcessInstance records have Status as 'Pending' but their children stepsAndWorkItems always return null.This does not happen when I use an original record and try the same in Executing_Anynomous_Window with a real record it gives me StepsAndWorkItems records. Please tell me what to do. Thanks
- Sreechu
- March 27, 2014
- Like
- 1
- Continue reading or reply
Problem with SOQL Filtering 'like' when using Tooling-API
I am trying to use Tooling-API and query all Classes using this string:
String soqlQuery = SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01pf0000000DHYYAA4\'
This works fine and loads the particular class, BUT if I try :
String soqlQuery =
SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01p%\'
I get this error on page: " Malformed JSON: Expected '{' at the beginning of object "
Can anyone tell what is wrong ? or is it that LIKE clause cannot be used while constructing a Query ?
(This is later passed to : HTTPRequestInstance.setEndpoint(URL + soqlQuery); )
- Sreechu
- February 24, 2014
- Like
- 1
- Continue reading or reply
Quering for ProcessInstanceHistory records in test class gives no results
[ select id, status, lastmodifieddate,lastmodifiedby.Name, isdeleted,createddate , createdby.Name, targetobjectId , (select Id, IsPending, ProcessInstanceId , TargetObjectId , StepStatus, OriginalActor.Name , Actor.Name , RemindersSent from StepsAndWorkItems order by createdDate desc, stepstatus asc) from ProcessInstance where TargetObjectId =:testRec.Id ]
the problem is the testRec was succesfully submitted for approval and the ProcessInstance records have Status as 'Pending' but their children stepsAndWorkItems always return null.This does not happen when I use an original record and try the same in Executing_Anynomous_Window with a real record it gives me StepsAndWorkItems records. Please tell me what to do. Thanks
- Sreechu
- March 27, 2014
- Like
- 1
- Continue reading or reply
Problem with SOQL Filtering 'like' when using Tooling-API
I am trying to use Tooling-API and query all Classes using this string:
String soqlQuery = SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01pf0000000DHYYAA4\'
This works fine and loads the particular class, BUT if I try :
String soqlQuery =
SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01p%\'
I get this error on page: " Malformed JSON: Expected '{' at the beginning of object "
Can anyone tell what is wrong ? or is it that LIKE clause cannot be used while constructing a Query ?
(This is later passed to : HTTPRequestInstance.setEndpoint(URL + soqlQuery); )
- Sreechu
- February 24, 2014
- Like
- 1
- Continue reading or reply
Add users into a Queue i apex code
Hi All,
How can we add users into an existing Queue or newly created (in apex code) Queue in apex code?
Then I want to use that queue for an approval process which also created in apex code. How can I resolve this issue?
Thanks in Advance
- Chamil Madusanka
- August 05, 2011
- Like
- 1
- Continue reading or reply
Add users into a Queue i apex code
Hi All,
How can we add users into an existing Queue or newly created (in apex code) Queue in apex code?
Then I want to use that queue for an approval process which also created in apex code. How can I resolve this issue?
Thanks in Advance
- Chamil Madusanka
- August 05, 2011
- Like
- 1
- Continue reading or reply