Merge pull request #682 from automatisch/salesforce/replace-object-with-record

refactor(salesforce): replace object with record
This commit is contained in:
Ömer Faruk Aydın
2022-11-05 16:13:17 +01:00
committed by GitHub
3 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import updatedFieldInObjects from "./updated-field-in-objects";
import updatedFieldInRecords from "./updated-field-in-records";
export default [
updatedFieldInObjects
updatedFieldInRecords
];

View File

@@ -1,11 +1,11 @@
import defineTrigger from '../../../../helpers/define-trigger';
import updatedFieldInObjects from './updated-field-in-objects';
import updatedFieldInRecords from './updated-field-in-records';
export default defineTrigger({
name: 'Updated field in objects',
key: 'updatedFieldInObjects',
name: 'Updated field in records',
key: 'updatedFieldInRecords',
pollInterval: 15,
description: 'Triggers when a field is updated in an object.',
description: 'Triggers when a field is updated in a record.',
arguments: [
{
label: 'Object',
@@ -50,6 +50,6 @@ export default defineTrigger({
],
async run($) {
await updatedFieldInObjects($);
await updatedFieldInRecords($);
},
});

View File

@@ -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 field = $.step.parameters.field 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);
};
export default updatedFieldInObjects;
export default updatedFieldInRecord;