I connected the lead with API so the lead will get from different companies’ websites automatically saving the contact us, so I want to save the lead based on the company.
I added some custom scripts.
before_save:function(frm)
{
if(frm.doc.company==" Company 1")
{
frm.set_value(“naming_series”,“CF-DXB-.YYYY.-”)
}
else if (frm.doc.company==" Company 2")
{
frm.set_value(“naming_series”,“CF-EKM-.YYYY.-”)
}
},
But it is not working. Please help me with this also I want to change the company field position to above from more information so for that I edit the JSON file (lead.json) and migrate no error found but the poison of company did not change