Hi all,
Scenario : while an importing i want to "employment type" in excel column.
if user give it to '0' "employment type should be updated in "Employee"
if user give it to "Employee" should be updated in "Employee"
if user wrongly mentioned Employment type (3, or something) i want to throw error if employment type not in........""
below my code.
if(hcmEmployment.RecId)
{
ttsbegin;
hcmEmployment.selectForUpdate(true);
hcmEmployment.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
hcmEmployment.EmploymentType = str2Enum(employmentType, range.get_Item(rowNo,6).Value);
//condition //hcmEmployment.EmploymentType = str2int(employmentType, range.get_Item(rowNo,6).Value) ?str2Enum(employmentType, range.get_Item(rowNo,6).Value) : "";
hcmEmployment.doUpdate();
ttscommit;
}
Thanks