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
leoSFDC 13leoSFDC 13 

Live agent prechat field assignment to task record

we are using live agent and in our web fom we have below mention code

<input type="hidden" name="liveagent.prechat.findorcreate.map:Task" value="Subject,Problem Type;RecordTypeId,TaskRecordTypeId" />
<select name="liveagent.prechat:Problem Type" id="problemType"> <option value="">Select Problem Type</option> <option value="Administration Tool issue">Administration Tool issue</option> </select>
this code is to create taks record from live chat.
i am assigning problem type to subject feld

i have one more field in our web form
<td colspan="3"><textarea rows="3" cols="55" name="liveagent.prechat:Task Subject," id="taskSubject" class="chatField DescriptionField subjectField"></textarea> </td>
how can i concatenate problem type and taskSubject to assign in task's subject field

 
Raj VakatiRaj Vakati
You can create a variable in apex class with string type  and populate the value in input filed 
leoSFDC 13leoSFDC 13
Raj V
if i try to create a prop in apex class and give value of that in input field like mention below
<input type="hidden" name="liveagent.prechat:ChatSubject" value="{!TaskChatSubject}" />
now for task creation i have done below mentioned code
<input type="hidden" name="liveagent.prechat.findorcreate.map:Task" value="Subject,ChatSubject;RecordTypeId,TaskRecordTypeId" />
if i assign prop TaskChatSubject='ffsfsf' in controller side on page load that will become the task subject
becase we are having code   <input type="hidden" name="liveagent.prechat:ChatSubject" value="{!TaskChatSubject}" />

but when user clickes chat button even though i change  the value liveagent.prechat:ChatSubject='test subject' in java script because value is alreay assign to task subject with this line
<input type="hidden" name="liveagent.prechat.findorcreate.map:Task" value="Subject,ChatSubject;RecordTypeId,TaskRecordTypeId" />

we are not able to get updated java script change text with task record

  thanks in advance