Update Lookup Type Custom Field value Using Javascript object Model(JSOM)

In this post, I will explain to Update Lookup Type Custom Field value Using Javascript object Model(JSOM). In my previous post, I explained you to Update Custom Field Value using Java Script Object Model(JSOM). You can also update lookup type custom field value using Client-Side Object Model(CSOM) and Project Server Interface(PSI) as I explained you in my previous post.

Update Non-Lookup type custom field using below code

Update lookup Type custom field using below code.

Note: If you are updating lookup type custom field then pass lookup table value Internal Name in square brackets [ ].

You can get lookup table value using below code

[AdSense-A]

Here is complete code to update lookup and non-lookup value using Javascript Object Model(JSOM)