I have a csv file which contains list of employees. This list is imported on periodic bases. These data however sometimes changes. I want be able to compare the data to be imported to the existing data. If an employee exists in the database but is not in the import list it should be marked inactive/terminated. How do I compare the existing data to the list on the file to be imported?
Thanks.
Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
0
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
Then at the end loop through the employee record and see if it exists in Temporary record, if it doesn't then you can expire that employee
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
http://www.BiloBeauty.com
http://www.autismspeaks.org
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I am trying to implement your suggestion but it's not working. Below is the code am using: Am I missing something?
Create a new field in the employee card "Active Employee"::Boolean.
In the dataport add ONE LINE OF CODE:
done.
* PS what ever happened to the old Navision logo "The Beauty Of Simplicity"
I'm assuming that on onaftergerimportrecord you are populating Temp record.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
On predataItem
Emp.modifyall (status,Status::Inactive);
On afterimportRecord add code to change the status to active.
validate(status,Status::Active);
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
OnPreDataItem:
Then on AfterImportRecord: But still the status is inactive for all employees.
Thanks.
Any help please.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n