-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
65Questions
-
20Replies
filter the A object records
Hi experts,
I have a two objects there are A and B, both are related two each other(Lookup Relation).and I create lookup field in B object, when I can click on lookup icon button in B object , it will show 10 record of A object,I have a requement here, lookup field only allow 4 records out of 10 records.
give me sample code..!
I have a two objects there are A and B, both are related two each other(Lookup Relation).and I create lookup field in B object, when I can click on lookup icon button in B object , it will show 10 record of A object,I have a requement here, lookup field only allow 4 records out of 10 records.
give me sample code..!
-
- Ravi Kumar 259
- May 16, 2015
- Like
- 0
- Continue reading or reply
-
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
-
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
-
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
-
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
-
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
- Ravi Kumar 259
- May 14, 2015
- Like
- 0
- Continue reading or reply
How to stop background jobs?
We need to stop Job named "Duplicate Error Log Sweeper" in background jobs, any suggestions will be much appreciated.
- Antony Renald
- May 12, 2015
- Like
- 0
- Continue reading or reply
- Ravi Kumar 259
- April 28, 2015
- Like
- 0
- Continue reading or reply
SOQL limit hitting when firing a query.
List<Campaign> campOBj=[Select id from campaign];
Set<Id> campId=new Set<Id>();
For(Campaign campValues : campOBj)
{
campId.add(campValues.id);
}
For(Id campIdV : campId)
{
List<campaignMember> countCM=[Select id from campaignMember where campaignid = : campIdV limit 30000];
}
This is a simple code but its giving error:
System.LimitException: Too many query rows: 50001
In my org their is total number of CAMPAIGN='66'
when is see in my DEBUG: it only work for 12 CAMPAIGN then gives this error:
Values in Debug Log-----
**campId701D0000000d0MQIAY
***count13516
**campId701D0000000cxAWIAY
***count10156
**campId701D0000000cylEIAQ
***count3833
**campId701D0000000cxXpIAI
***count14084
**campId701D0000000cxrfIAA
***count1
**campId701D0000000cwzFIAQ
***count3606
for rest of the 6 campaign its giving 0 count thats why i didnt mention here and after that for this campaign id its showing error and the debug stops-
**campId701D0000000cyZDIAY
what i was thinking when i added all the count its approx 46000 i think thats why the count is going more than 50,000 but its not possible can anyone give me a possible ans why this is giving error. as soql doesn't work like this.
Set<Id> campId=new Set<Id>();
For(Campaign campValues : campOBj)
{
campId.add(campValues.id);
}
For(Id campIdV : campId)
{
List<campaignMember> countCM=[Select id from campaignMember where campaignid = : campIdV limit 30000];
}
This is a simple code but its giving error:
System.LimitException: Too many query rows: 50001
In my org their is total number of CAMPAIGN='66'
when is see in my DEBUG: it only work for 12 CAMPAIGN then gives this error:
Values in Debug Log-----
**campId701D0000000d0MQIAY
***count13516
**campId701D0000000cxAWIAY
***count10156
**campId701D0000000cylEIAQ
***count3833
**campId701D0000000cxXpIAI
***count14084
**campId701D0000000cxrfIAA
***count1
**campId701D0000000cwzFIAQ
***count3606
for rest of the 6 campaign its giving 0 count thats why i didnt mention here and after that for this campaign id its showing error and the debug stops-
**campId701D0000000cyZDIAY
what i was thinking when i added all the count its approx 46000 i think thats why the count is going more than 50,000 but its not possible can anyone give me a possible ans why this is giving error. as soql doesn't work like this.
- Hemant Rana 14
- April 15, 2015
- Like
- 0
- Continue reading or reply
- viswsanath
- May 11, 2013
- Like
- 0
- Continue reading or reply