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
Dzianis PuchkoDzianis Puchko 

You cannot set custom Details after page initialization

Using the deployment.js solution for the salesforce livechat I faced an issue that i am not able to change customDetails for the livechat after the page was rendered

is it a possibility to avoid the error

"You cannot set custom Details after page initialization."

and add the details before the chat will open ?

 

thank you ?

ShirishaShirisha (Salesforce Developers) 
Hi Dzianis,

Greetings!

Can you please check the below thread for the solution worked for the other user.

https://developer.salesforce.com/forums/?id=906F00000008sPwIAI

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Dzianis PuchkoDzianis Puchko

Thanks, Shirisha

 

Unfortunattely this solution does satisfy the requirements I have.

 

The scenario I have I:

1. user enters the page with a chat button

2. user enters some text (it will be the question in future) in a text field

3. use clicks "start chat" button.

 

and the moment user clicks the button I want to add the Questions as a customDetails to the liveagent API, but I receive an error "You cannot set custom Details after page initialization"