-
ChatterFeed
-
1Best Answers
-
0Likes Received
-
0Likes Given
-
6Questions
-
7Replies
Setup Trusted IP range through API
Hello,
is there any option how to setup trusted IP range (Security Controls -> Network Access) through API request?
Thanks in advance
-
- T-S.com
- February 17, 2012
- Like
- 0
- Continue reading or reply
How to bulkify trigger
Hi all,
I'm pretty new to SFDC development and I need to bulkify following trigger. I've checked multiple resources, but couldn't move forward. :( Every help will be highly appreciated!
Regs
---------------------------------
trigger BI_Rental_CheckAssetStatus on Rental__c (before insert) {
// Disables to rent assets with other status than Available.
for(Rental__c myRental : trigger.new){
Asset__c myAsset = [SELECT status__c FROM Asset__c WHERE Id = :myRental.Asset__c];
if(myAsset.status__c != 'Available'){
myRental.addError('You cannot borrow asset, which has a different status than Available. Current asset status is ' + myAsset.status__c + '.');
}
}
}
---------------------------------
-
- T-S.com
- February 14, 2012
- Like
- 0
- Continue reading or reply
Translation of Trigger Error Message
Hello,
is it possible to use Translation Workbench for trigger error message translation, please?
Thanks for any proposals.
Best Regards
-
- T-S.com
- January 30, 2012
- Like
- 0
- Continue reading or reply
Getting picklist values dynamically
Is it possible to retrieve values for Picklist object from SFDC by Android SDK / REST or SOQL?
-
- T-S.com
- January 25, 2012
- Like
- 0
- Continue reading or reply
Retrieving picklist values
I it possible to retrieve values for Picklist object from SF by Android SDK / REST or SOQL?
-
- T-S.com
- January 25, 2012
- Like
- 0
- Continue reading or reply
Trigger test class error - null object reference
Hello,
I've written a test class for my trigger, but it doesn't work correctly because it always references a null object.
@isTest
private class Trigger_Test{
static testMethod void testInsert() {
Object1__c myObject1 = new Object1__c (name = '123', status__c = 'A');
Object2__c myObject2 = new Object2__c (name = 'John Doe');
Object3__c myObject3 = new Object3__c(Object1__c = myObject1.Id, Object2__c = myObject2.Id, date__c = datetime.now()); // should launch trigger that changes myObject1.status__c = 'X'
insert myObject1;
insert myObject2;
System.debug('Object3 name ' + myObject3.name + ' Object1 ' + myObject3.Object1__c + ' Object2 ' + myObject3.Object2__c);
insert myObject3;
System.assertEquals('X', [SELECT status__c FROM Object1__c WHERE id =: myObject1.id].status__c);
}
}
Already the system debug displays that myObject3 doesn't exist (all references are null) and assert then naturally fails.
Thanks in advance for any help!
-
- T-S.com
- January 20, 2012
- Like
- 0
- Continue reading or reply
How to bulkify trigger
Hi all,
I'm pretty new to SFDC development and I need to bulkify following trigger. I've checked multiple resources, but couldn't move forward. :( Every help will be highly appreciated!
Regs
---------------------------------
trigger BI_Rental_CheckAssetStatus on Rental__c (before insert) {
// Disables to rent assets with other status than Available.
for(Rental__c myRental : trigger.new){
Asset__c myAsset = [SELECT status__c FROM Asset__c WHERE Id = :myRental.Asset__c];
if(myAsset.status__c != 'Available'){
myRental.addError('You cannot borrow asset, which has a different status than Available. Current asset status is ' + myAsset.status__c + '.');
}
}
}
---------------------------------
- T-S.com
- February 14, 2012
- Like
- 0
- Continue reading or reply
Getting picklist values dynamically
Is it possible to retrieve values for Picklist object from SFDC by Android SDK / REST or SOQL?
- T-S.com
- January 25, 2012
- Like
- 0
- Continue reading or reply
Trigger test class error - null object reference
Hello,
I've written a test class for my trigger, but it doesn't work correctly because it always references a null object.
@isTest
private class Trigger_Test{
static testMethod void testInsert() {
Object1__c myObject1 = new Object1__c (name = '123', status__c = 'A');
Object2__c myObject2 = new Object2__c (name = 'John Doe');
Object3__c myObject3 = new Object3__c(Object1__c = myObject1.Id, Object2__c = myObject2.Id, date__c = datetime.now()); // should launch trigger that changes myObject1.status__c = 'X'
insert myObject1;
insert myObject2;
System.debug('Object3 name ' + myObject3.name + ' Object1 ' + myObject3.Object1__c + ' Object2 ' + myObject3.Object2__c);
insert myObject3;
System.assertEquals('X', [SELECT status__c FROM Object1__c WHERE id =: myObject1.id].status__c);
}
}
Already the system debug displays that myObject3 doesn't exist (all references are null) and assert then naturally fails.
Thanks in advance for any help!
- T-S.com
- January 20, 2012
- Like
- 0
- Continue reading or reply