Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions client-src/sagas/recordCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@ 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/';

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 <select>
Expand Down