Hey Team,
I want to compare the dates in various tables like HCmPositionDetail an my custom table and if they are not same I want to update them in the respective table.
I wrote my code this way but I'm getting an error "Operator '!=' cannot be applied to operands of type 'utcdatetime' and 'date'.". How can resolve this issue. Please help me.
Hcmpositiondetail positionDetail;
AssociateTable associate;
if(positionDetail.ValidFrom != associate.StartDate)
{
positionDetail.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
positionDetail.ValidFrom = associate.StartDate;
positionDetail.update();
}
if(positionDetail.ValidTo != associate.EndDate)
{
positionDetail.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
positionDetail.ValidTo = associate.EndDate;
positionDetail.update();
}