Merge pull request #682 from automatisch/salesforce/replace-object-with-record
refactor(salesforce): replace object with record
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import updatedFieldInObjects from "./updated-field-in-objects";
|
import updatedFieldInRecords from "./updated-field-in-records";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
updatedFieldInObjects
|
updatedFieldInRecords
|
||||||
];
|
];
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import defineTrigger from '../../../../helpers/define-trigger';
|
import defineTrigger from '../../../../helpers/define-trigger';
|
||||||
import updatedFieldInObjects from './updated-field-in-objects';
|
import updatedFieldInRecords from './updated-field-in-records';
|
||||||
|
|
||||||
export default defineTrigger({
|
export default defineTrigger({
|
||||||
name: 'Updated field in objects',
|
name: 'Updated field in records',
|
||||||
key: 'updatedFieldInObjects',
|
key: 'updatedFieldInRecords',
|
||||||
pollInterval: 15,
|
pollInterval: 15,
|
||||||
description: 'Triggers when a field is updated in an object.',
|
description: 'Triggers when a field is updated in a record.',
|
||||||
arguments: [
|
arguments: [
|
||||||
{
|
{
|
||||||
label: 'Object',
|
label: 'Object',
|
||||||
@@ -50,6 +50,6 @@ export default defineTrigger({
|
|||||||
],
|
],
|
||||||
|
|
||||||
async run($) {
|
async run($) {
|
||||||
await updatedFieldInObjects($);
|
await updatedFieldInRecords($);
|
||||||
},
|
},
|
||||||
});
|
});
|
@@ -12,7 +12,7 @@ function getQuery(object: string, limit: number, offset: number) {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const updatedFieldInObjects = async ($: IGlobalVariable): Promise<void> => {
|
const updatedFieldInRecord = async ($: IGlobalVariable): Promise<void> => {
|
||||||
const limit = 200;
|
const limit = 200;
|
||||||
const field = $.step.parameters.field as string;
|
const field = $.step.parameters.field as string;
|
||||||
const object = $.step.parameters.object as string;
|
const object = $.step.parameters.object as string;
|
||||||
@@ -42,4 +42,4 @@ const updatedFieldInObjects = async ($: IGlobalVariable): Promise<void> => {
|
|||||||
} while (response.data.records?.length === limit);
|
} while (response.data.records?.length === limit);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default updatedFieldInObjects;
|
export default updatedFieldInRecord;
|
Reference in New Issue
Block a user