I was told that the greetings "Good Afternoon" and "Good Night" should not be used while first looking at someone for the day, in a corporate world. Is that true?
You can say "Good morning" before 12:00 noon. "Good afternoon" is the normal thing to say when greeting someone politely after 12:00 noon, up to 6 PM approximately. You could say "Good evening" after that. However, "Good night" is not a greeting, but is said when leaving someone during the late evening. Perhaps this has confused the person who told you not to say "Good afternoon" or "Good night". We do not capitalise afternoon, evening or night when writing these greetings or farewells.
I’ve never heard that rule, and I’ve never had someone question me for greeting them with “Good morning”, “Good afternoon” or “Good evening” in a professional setting, aside from a friendly correction when on video or phone conferences with someone in a different time zone.
Note that “Good day” (except in Australia) and “Good night” have a different usage.
If we’re addressing someone we know well, such as a friend, a family member, or an associate with whom we’re close, a fail-safe salutation remains Hi, Hello, Greetings, or Good Morning, Good Afternoon, or Good Evening.
A business relationship can be close or distant; in either case, the careful speaker will remain aware of a professional context with proper boundaries and degrees of distance.
The salutation; Hello Mr Brown/Miss Brown, can be used as the speaker sees appropriate in business.
Edit: When writing, we might also open with Hi, Hello, Greetings, or Good Morning, Good Afternoon, or Good Evening. Salutations in personal correspondence are followed with a comma (e.g., Dear Samantha,). It is also standard practice to capitalize the first word and any following noun. Good Morning not good morning.