hougaard / ToolBox-Issues

Support Repository for Erik's ToolBox
1 stars 0 forks source link

Cannot change primary key field #18

Open StevenHit opened 1 year ago

StevenHit commented 1 year ago

Hi,

We try to change the document number for a posted sales invoice via ToolBox, but we get errors.

Is there a possibility to rename records with any of the toolbox functionalities?

Thanks

image

image

hougaard commented 1 year ago

No, not possible in the batch processing module, you'll have to write AL code to do that.

StevenHit commented 1 year ago

The coding feature in Toolbox doesn't seem to have a "rename" command. Does that mean that we cannot rename with any of the toolbox features?

hougaard commented 1 year ago

Yeah, .Rename() is complicated to implement behind the scene in a truly dynamic manner.

I usually copy the record with rec.copy() and the .delete() and .Insert().

I might be able to implement .Rename() for single field key with Code fields..