learningcourses
Represents a LearningCourse REST API structure
GET
URI
/services/apexrest/v1.0/learningcourses/*
Description
Returns learning course records based on learning courses name, learning courses ID, or learning courses worker ID, and optionally custom fields of LearningCourse object that are passed as parameters in request URL
Input Parameters
ids
Comma-separated Salesforce record IDs of learning courses
names
Comma-separated names of learning courses, use double quotes for all entries
workerids
Comma-separated Salesforce record IDs of related workers
customfields
Comma-separated custom field names of Learning_Plan__c object
Sample Code
// GET Response
[{
"LastModifiedDate": "2016-05-30T06:55:33.000Z",
"LastModifiedById": "00515000006AFf4AAG",
"Id": "a2S15000000wkFkEAI",
"CreatedDate": "2016-05-30T06:55:33.000Z",
"CreatedById": "00515000006AFf4AAG",
"Worker": "a4M15000000Gw5iEAC",
"User": null,
"Status": "Submitted",
"StartDate": "2016-11-02",
"Score": 10,
"PassFail": "Pass",
"OwnerId": "00515000006AFf4AAG",
"Name": "LearningCatalog1",
"LearningUrl": null,
"LearningCatalogType": null,
"LearningCatalog": "a2Q15000000FeONEA0",
"ExternalLearningCourse": "ExternalLearningCourse",
"ExternalLearningCost": 55000,
"DevelopmentPlan": "a1p15000003PyWwAAK",
"Description": "Description",
"CompletionDate": "2017-11-02",
"CustomFields": [{
"Value": "Test Custom Field Text",
"FieldName": "Custom_Field_Text__c"
}, {
"Value": "10",
"FieldName": "Custom_Field_Number__c"
}, {
"Value": "foo@bar.com",
"FieldName": "Custom_Field_Email__c"
}, {
"Value": "2018-11-02 00:00:00",
"FieldName": "Custom_Field_Date__c"
}, {
"Value": "true",
"FieldName": "Custom_Field_Checkbox__c"
}]
}]
POST
URI
/services/apexrest/v1.0/learningcourses/*
Description
Insert learning course records
Input Parameters
records
Learning Course records that need to be inserted
Sample Code
// POST Request
{
"records": [{
"CompletionDate": "2017-11-02",
"Description": "Description",
"DevelopmentPlan": "a1p15000003PyWwAAK",
"ExternalLearningCost": 55000,
"ExternalLearningCourse": "ExternalLearningCourse",
"LearningCatalog": "a2Q15000000FeONEA0",
"PassFail": "Pass",
"Score": 10,
"StartDate": "2016-11-02",
"Status": "Submitted",
"Worker": "a4M15000000Gw5iEAC",
"CustomFields": [{
"FieldName": "Custom_Field_Text__c",
"Value": "Test Custom Field Text"
}, {
"FieldName": "Custom_Field_Number__c",
"Value": 10
}, {
"FieldName": "Custom_Field_Email__c",
"Value": "foo@bar.com"
}, {
"FieldName": "Custom_Field_Date__c",
"Value": "2015-12-02"
}, {
"FieldName": "Custom_Field_Checkbox__c",
"Value": true
}]
}, {
"CompletionDate": "2017-11-02",
"Description": "Description",
"DevelopmentPlan": "a1p15000003PyWwAAK",
"ExternalLearningCost": 55000,
"ExternalLearningCourse": "ExternalLearningCourse",
"LearningCatalog": "a2Q15000000FeOSEA0",
"PassFail": "Pass",
"Score": 10,
"StartDate": "2016-11-02",
"Status": "Submitted",
"Worker": "a4M15000000Gw5nEAC"
}]
}
// POST Response
[
"a1fj000000104slAAI",
"a1fj000000104smAAI"
]
PATCH
URI
/services/apexrest/v1.0/learningcourses/*
Description
Insert or update learning course records
Input Parameters
records
Learning Course records that need to be inserted or updated
Sample Code
// PATCH Request
{
"records": [{
"Id": "a2S15000000wkFqEAI",
"CompletionDate": "2017-11-02",
"Description": "Description",
"DevelopmentPlan": "a1p15000003PyWwAAK",
"ExternalLearningCost": 55000,
"ExternalLearningCourse": "UpdatedExternalLearningCourse",
"LearningCatalog": "a2Q15000000FeOSEA0",
"PassFail": "Pass",
"Score": 10,
"StartDate": "2016-11-02",
"Status": "Submitted",
"Worker": "${#TestSuite#Worker1_ID}",
"CustomFields": [{
"FieldName": "Custom_Field_Text__c",
"Value": "Updated Test Custom Field Text"
}, {
"FieldName": "Custom_Field_Number__c",
"Value": 20
}, {
"FieldName": "Custom_Field_Email__c",
"Value": "bar@foo.com"
}, {
"FieldName": "Custom_Field_Date__c",
"Value": "2018-12-02"
}, {
"FieldName": "Custom_Field_Checkbox__c",
"Value": false
}]
}, {
"Id": "a2Q15000000FeONEA0",
"CompletionDate": "2017-11-02",
"Description": "Description",
"DevelopmentPlan": "a1p15000003PyWwAAK",
"ExternalLearningCost": 55000,
"ExternalLearningCourse": "UpdatedExternalLearningCourse",
"LearningCatalog": "a2Q15000000FeOmEAK",
"PassFail": "Pass",
"Score": 10,
"StartDate": "2016-11-02",
"Status": "Submitted",
"Worker": "a4M15000000Gw5iEAC"
}]
}
// PATCH Response
[
"a1fj000000104slAAI",
"a1fj000000104smAAI"
]