From f08fcdbf076827ff760e58423dac230c963037d0 Mon Sep 17 00:00:00 2001 From: willianmatheus98 Date: Fri, 28 Aug 2020 11:57:50 -0300 Subject: [PATCH] fields to Ignore --- client-src/sagas/recordCreator.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client-src/sagas/recordCreator.js b/client-src/sagas/recordCreator.js index 06b7ccd..050f6d7 100644 --- a/client-src/sagas/recordCreator.js +++ b/client-src/sagas/recordCreator.js @@ -2,6 +2,8 @@ import { call, put } from 'redux-saga/effects' import { recordCreateSuccess, showError } from '../actions' +const FIELDS_TO_IGNORE = ['IsCustomerPortal']; + export default function* recordCreator (action) { let recordDataUrl = action.creds.instanceUrl + '/services/data/v43.0/ui-api/records/'; @@ -9,7 +11,14 @@ export default function* recordCreator (action) { var recordInput = {}; recordInput.apiName = action.apiName; recordInput.fields = {}; + + Object.keys(action.editValues).map((field) => { + + if(FIELDS_TO_IGNORE.includes(field)){ + return; + } + let inputValue = action.editValues[field].current; if (action.editValues[field].original == null && inputValue == '') { // React doesn't like nulls in