Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to associate Holidays with BusinessHoursSettings #1

Open
ehsky opened this issue Apr 24, 2022 · 1 comment
Open

Not able to associate Holidays with BusinessHoursSettings #1

ehsky opened this issue Apr 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ehsky
Copy link
Owner

ehsky commented Apr 24, 2022

The example flow will create the holiday records and find the default Business hour config, but will not assosicate the holiday records with business hour config.
Check out the salesforce ide here https://ideas.salesforce.com/s/idea/a0B8W00000GddBHUAZ/expose-junction-between-business-hours-and-holidays

A potential workaround could be to include a minified version of apex-mdapi that can deploy the metadata type BusinessHoursSettings.

24.04.2022: Apex-mdapi have wrong Datatype in class MetadatService.BusinessHoursEntry. All DateTime should be Time. Will maybe file a bug to there repo. Some rubbish test code is added in the script folder. Able to create xml file, but deployment fails with unkown error.

@ehsky ehsky self-assigned this Apr 24, 2022
@ehsky ehsky added the bug Something isn't working label Apr 24, 2022
@ehsky ehsky pinned this issue Apr 24, 2022
@ehsky
Copy link
Owner Author

ehsky commented Apr 24, 2022

When trying to use class MetadataService.BusinessHoursEntry it's returning that the DataType DateTime is wrong and should be time.

23:02:15.330 (2515433145)|EXCEPTION_THROWN|[13265]|System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: '2022-04-23T22:00:00.000Z' is not a valid value for the type xsd:time faultcode=soapenv:Client faultactor=

After changing all DateTime to Time i have the following error message returned.

System.UnexpectedException: Got an unexpected error in callout : Unsupported type: Time. Contact support with error ID: 185571183-157238 (840816463)

Changing the DataType to String and passing the Time in as String fixed the deployment issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant