Below code will be useful to update the primary key field value in finance and operations.
To do that use runnable class to execute the code.
class VendAccountRename
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
VendTable vendTableupdate;
ttsbegin;
select firstonly vendTableupdate where vendTableupdate.AccountNum == '1002';
if(vendTableupdate)
{
vendTableupdate.AccountNum = 'US-1002';
vendTableupdate.renamePrimaryKey();
info("Record updated");
}
select firstonly vendTableupdate where vendTableupdate.AccountNum == 'US-1002';
info(vendTableupdate.AccountNum);
}
}
Happy daxing!!!
To do that use runnable class to execute the code.
class VendAccountRename
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
VendTable vendTableupdate;
ttsbegin;
select firstonly vendTableupdate where vendTableupdate.AccountNum == '1002';
if(vendTableupdate)
{
vendTableupdate.AccountNum = 'US-1002';
vendTableupdate.renamePrimaryKey();
info("Record updated");
}
select firstonly vendTableupdate where vendTableupdate.AccountNum == 'US-1002';
info(vendTableupdate.AccountNum);
}
}
Happy daxing!!!
abanludo_Peoria Keith Hunt https://wakelet.com/wake/DK1eRL09_oW0kitGI2I5a
ReplyDeletepecmamava