Set the name of a Stock item

Parameters

id

Integer ID for the stock item.

val

String. The new name for the item

Example

FM_api('Stock_setName',
	[
		'id'=>'7',
		'val'=>'2kg 1.75mm PLA Filament'
	]
);

Result

{"ok":1}

If you try to update a Stock name to the name it already has, you will get a warning:

{"ok":1,"warning":"No change needed"}