Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I want to update all PersonnelNumber as given in below:
There are 2 column Old & New.
One by one can be do by below X++ code but I want all at time because I have more than 300 PersonnelNumber.
As per your screen i hope it is excel sheet, so you can refer the below link to update all the data by looping the sheet.
Hi faiz7049 ,
while select forupdate hcmWorker
If you need in how to read excel file here are some links , you can follow
Getting error using below code:
static void Job42(Args _args)
HcmPersonnelNumberId P1, P2;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
filename = @"C:\Users\faiz\Desktop\EMP.xlsx";
throw error("File cannot be opened.");
workbook = workbooks.item(1);
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
P1 = cells.item(row, 1).value().bStr();
P2 = cells.item(row, 2).value().bStr();
update_recordSet hcmWorker setting PersonnelNumber= P2 where hcmWorker.PersonnelNumber==P1;
type = cells.item(row+1, 1).value().variantType();
while (type != COMVariantType::VT_EMPTY);
Working after delete a record like 0100.
Business Applications communities