This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inventory = { | |
'000001': { | |
name: 'Banana Slicer', | |
price: 2.99 | |
}, | |
'000002': { | |
name: 'Three Wolves Tea Cozy', | |
price: 14.95 | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SObjectType sot = Your_Custom_Object__c.SObjectType; | |
Map<String, SObjectField> fields = sot.getDescribe().fields.getMap(); | |
for(String k : fields.keyset()) { | |
DescribeFieldResult dfr = fields.get(k).getDescribe(); | |
if(!dfr.isNillable()) { | |
System.debug('REQUIRED FIELD: ' + k); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String oid = ''; | |
SObject obj = [select id from task where id = :oid ]; | |
String objType = obj.getSObjectType().getDescribe().getName(); | |
System.debug('loading fields'); | |
List<String> accessibleFields = new List<String>(); | |
Map<String, Schema.SobjectField> fields = obj.getSObjectType().getDescribe().fields.getMap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.TimeUnit | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.http.request.builder._ | |
import io.gatling.core.session._ | |
import io.gatling.http.check.HttpCheck | |
import io.gatling.http.request.StringBody | |
import io.gatling.core.structure.{PopulatedScenarioBuilder, ChainBuilder} |