No, an investor will not get the dividend if he buys the stock on record date.
An investor can be qualified for dividends only if he holds the stock in their demat account on the ex -date/record date of the dividend issue.
Therefore, the stock purchase should be made at least one day before the ex-date/record date to ensure that the delivery of the stocks into the demat account is done by the record date.( as all the deliveries in demat a/c is received by T + 1 day).