Update int field of a doctype,when another doctype is saved

Hi,
I want to update a doctype field(avaialability) which is of type int. and is linked to a doctype item issue.For each item issue i want the avaialbility to reduce by 1.
How can i acheive this functionality ?
Do i have to write a server script ?

Yes, you have to use server script with the “Before Save” “DocType Event” so that the value is updated on every save event for the document.

1 Like