Yay! I’ve finally found a question that I can answer from personal experience!
I pulled a very similar version of this stunt on a good friend a couple of years ago, in our last year of high school. Although he is perhaps a sensitive soul, he was never short of female interest, particularly relative to the rest of us - perhaps this motivated us slightly!
Anyway, there was this girl who (IIRC) he had seen only once or twice, and things had gone pretty well, he really liked her and wanted to take things further, but then she didn’t respond to his calls/text messages for a couple of days, which got him thinking. The whole saga was annoying the rest of us a little since he could hardly talk about anything else.
So, one day when he left his bag unattended for a minute in the common room, I got one of my other friends to “borrow” his mobile phone for a second without his knowledge. I then changed the stored name for my mobile phone number to the girls name, and (for symmetry) put my name under her number. Returning the phone to his bag undetected, I then waited for him to go to class before sending him a text message asking if he wanted to go on a date (I even asked a female friend what wording to use to make it convincing).
Now, first of all I hardly expected it to work since I assumed that although he would see that it was from “xxxxx”, the actual number would be mine. However, he completely overlooked this and we got a positive (almost desperate) response. So we carried on the charade for a couple of hours, to the point of arranging a place and time.
It could have been REALLY funny if we had kept quiet, and then gone to meet him at the time we had arranged. Surprise! But, not being quite that heartless, we confessed (after first asking how it was going with xxxxx, are you going to the cinema at 7.30 tomorrow night? :D) that lunchtime. As I say, the funniest thing was not his obvious disappointment, but how perfectly the whole thing worked, and the fact we could have taken it further had we wanted to.
He wasn’t exactly mad, but it really knocked his confidence with this particular girl, despite our exhortations that no damage had been done since she was unaware of the incident, and he should carry on as before. For some reason, though, I don’t think he ever saw her again! This was probably partly down to her, though.
This didn’t prevent him venting his frustration on me, of course; he didn’t speak to me for about a week (though of course I apologised profusely - I hadn’t realised he’d take it so badly) and I think the revenge involved a beating, and soaking me with water. However, he did eventually see the funny side and we are still best of friends.
The story has a happy ending, too - a couple of weeks later he met his current girlfriend of almost two years. So maybe we did good!
Anyway, my advice to the OP would be - go for it! Because it WAS very funny.