I've implemented a custom chat window using visualforce due to requirements not available out of the box, it works quite well but the next challenge is to display the chat history when the customer starts a new chat.

It's like retrieving the chat history every time the customer scrolls up...

I know I can query the chat transcript from the ChatTranscript body field and I can work my way out using javascript though it's ugly and very hacky and not reliable when Salesforce changed the format of the transcript or add new styling since it's a RTA field.

My question is, salesforce doesn't store timestamp of file sent request and file sent upload, is there a way we can do it without using the body field? or any efficient way in achieving the requirements?


  • Are you not able to use the CreatedDate of the ChatTranscript to pull in it descending order before parsing through the body? Or am I misunderstanding the requirement? – Kris Goncalves Dec 24 '19 at 16:15
  • yes what I need to do is to display the chat transcript history as chat thread on the chat box, this includes files request and files sent, but Salesforce doesn't save the timestamp so I can't really pulled it from the chat transcript body field... – Jayson Faderanga Jan 14 at 3:46
  • one thing I thought of doing is to save the dom elements the moment a message is sent, then that's what I will pull and display on the on going chat when the visitor scrolls up...I think that is a lot easier.. – Jayson Faderanga Jan 14 at 3:48
  • also on a side not, are you from Portugal? I have a very close friend who has the same last name... :D – Jayson Faderanga Jan 14 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.