I have a javascript function that alerts the user if fields are not filled in. If they are all filled in then it saves. I am getting an error with using "{!Save}"
in my javascript.
Unknown property 'AccountStandardController.Save'
if(status = 'Final'){
if(GHCountry = '' ||
GHCity = '' ||
USHState = '' ||
USHCity = '' ||
OwnershipType = '' ||
MaaActivity = '' ||
OwnershipStage = '' ||
vision = '' ||
mission = '' ||
values = '' ||
marketShare = '' ||
marketCap = '' ||
sharePrice = '' ||
sales = '' ||
sharePriceDate = '' ||
weekChange = '' ||
strategy = '' ||
priority1 = '' ||
forwardLookingObjective = '' ||
pyResults = '' ||
priority1 = '' ||
priority2 = '' ||
plannedActivities = '' ||
priority4 = '' ||
priority5 = '' ||
initiatives = '' ||
status = ''){
alert('All fields must be filled when Account Plan is Final');
}else{
//save
'{!Save}';
}
}else{
//save
'{!Save}';
}
How can I save the record via javascript?