function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sdetweilsdetweil 

bulk load the org business hours

we are a worldwide company 24x7 and have many processes which span timezones and location business hours.

we have a table in our old system of business hours by country..   no problem, I can do that in SF too..

 

so I defined the default (us eastern), used the bulk loaded to extract it (to get the data format)

modeled my 187 records after that model

 

but bulk load fails with a ' need a sundastarttime', value provided incorrect.. 08:00:00.00Z

which matches exactly the extract format. hh:mm:ss.ttZ... timezone def

 

anyone have the magic incantation to help me understand this?

I can type them in.. but why do that...

 

Sam

PrashPrash

Try casting the date to SMALLDATETIME which I normally have to do when I setup interface beetween SQL Server and Salesforce.

 

By the what's the error message?

sdetweilsdetweil

the input is coming from a CSV file.. so I don't know how you would 'cast' in that case

 

the error is

 

'Sunday Start: value not of required type:  08:00'

and

'Sunday Start: value not of required type:  08:00:00.00Z'

 

two rows from the error file

 

NAME	ISACTIVE	ISDEFAULT	SUNDAYSTARTTIME	SUNDAYENDTIME	MONDAYSTARTTIME	MONDAYENDTIME	TUESDAYSTARTTIME	TUESDAYENDTIME	WEDNESDAYSTARTTIME	WEDNESDAYENDTIME	THURSDAYSTARTTIME	THURSDAYENDTIME	FRIDAYSTARTTIME	FRIDAYENDTIME	SATURDAYSTARTTIME	SATURDAYENDTIME	TIMEZONESIDKEY	ERROR
ADR	TRUE	FALSE	8:00	8:00:00	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	America/Los_Angeles	Sunday Start: value not of required type: 08:00
ALB	TRUE	FALSE	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	08:00:00.000Z	18:00:00.000Z	America/Los_Angeles	Sunday Start: value not of required type: 08:00:00.000Z

 

little hard to read, but follow the labels

 

PrashPrash

Remove "00.000Z" part from each datetime field and the import should work. You may first just test it on one rcord.

sdetweilsdetweil

nope, same problem

 

Sunday Start: value not of required type: 08:00:00

 

I had already tried 08:00 (see previous post)

 

the value exported by bulkloader is 08:00:00.000Z

 

I've tried with and without leading 0's

PrashPrash

Interesting. I never had to insert something with TIME datatype. Converting DateTime to SmallDateTime always took care of the issue in the past. Salesforce doesn't seem to have TIME data type either so not sure how internally BusinessHours stores the data.

 

I would be curious to find the solution though...

 

Goodluck!

kstevenskstevens

Hi, did you ever find a solution to this?

We are experiencing exactly the same problem.

Many thanks

Kevin

arousearouse
Ditto above. We're experiencing the same issue. Would be good to know if anybody has fixed this.
neckr2neckr2
Expericing the same error. Has anyone resolved the issue or have a work around?
neckr2neckr2
Recieved a solution from salesforce support.

The issue is a limitation of the Apex Data Loader. The Data Loader cannot process time without an associated date. They already have an open report for this bug with our Development team in which they are working on fixing this issue in a future release.

You could use WorkBench or try a third party data loader. To access WorkBench you can log into the following URL,

https://workbench.developerforce.com/login.php

Once you log in you can access the Data menu and then select either insert or update. You can upload using a file by selecting From File and then using browse to find your CSV file.

I used workbench and the upload worked
rkurarkura
Go to settings of Data Loader and enable Bulk API and it works.
API User 651API User 651
Corect format for those only loading hours is hh:mm:ss.sssZ