On LEcase table we have employmentend date we want that data to be populated on requesttable duedate

nikhitha24
Tera Guru

Hi Everyone,

 

Can someone please help me on below query

 

On Lifecycle event case table ,we have employment end date field we want that data to be populated on sc_request table due date(field)

by using activity field map unable to map because employement end date type is Date

Due date field is date and time type , it is throwing an error

nikhitha24_1-1722848205127.pngnikhitha24_2-1722848231947.png

 

 

 

nikhitha24_0-1722848107725.png

nikhitha24_3-1722848451177.png

currently in due date it is showing case opened date

 

Can someone help on this please

1 REPLY 1

Wessel van Enk
Tera Guru
Tera Guru

Hello,

The difference with the field types is something that can be really difficult. 
In this case you would need to create a script to convert the value into the right format to be placed into the field on the sc_request table, but you will not be able to do this from the field mapping in the LE configuration.  

So, you can create a custom field on sc_request with the same field type as the field on the LE table and then via script convert the format into the right format for the due date on sc_request. 

 

This is an example that I've used before to format time and dates, maybe this helps.

 

var end = g_form.getValue('enddate');
var endDate = getDateFromFormat(end, g_user_date_format);
endDate = new Date(endDate);