I'm investigating how feasible it would be to add a feature like this for Compact Recipe Pins, for a similar purpose. I looked into Toolbars first to see if you had already done it, since it would be a more appropriate feature for that mod.
After seeing how constrained LuaRecord is in the API, I'll lend a +1 to this thread.
My plan with the current API is to obtain the record ID by converting LuaPlayer::cursor_record into a string with tostring(), which you can parse for the ID.
blueprint-id.png (119.27 KiB) Viewed 98 times
The LuaRecord would get stored for later, and I could assign it to the player's cursor by exporting the record with LuaRecord::export_record(), then copying that to the cursor with LuaPlayer::cursor_stack.import_stack().
I would also need to come up with a way to render a blueprint icon with the correct display icons inside of a sprite-button, but I believe it's possible.
The main issue is, I don't know if the string output from converting the LuaRecord is deterministic. That is to say, different clients in a multiplayer game may see different numbered IDs, and accessing them would lead to desyncs.
It'd be nice to have some comment about whether this is safe to do, or my plans end here.
-------------
EDIT: Okay, a few days later, I have an implementation:
crp-record-pins.png (19.38 KiB) Viewed 29 times
If I may add another related suggestion, it would be the ability to open the editing GUI for a LuaRecord. This could be done through either:
A LuaRecord::open_gui function that accepts a LuaPlayer
Or be able to assign a LuaRecord to LuaPlayer::opened
If this is done using a LuaRecord that doesn't belong to that LuaPlayer, it should throw an error.