Okay, is this for K1 or K2?
If it's KotOR 1, this will work:
For KotOR 2, I got a little crafty with the engine...:
NOTE: In the DLG Editor, you'll need to put the number of quests you are updating into the first Script Parameter box (as a number). In the Script String Parameter box in DLG Editor, for each quest you'll need to put the tag of the quest followed by a ; then the ID of the quest entry, again followed by a ;. An example would be: "tutorial_garage;89;" without the quotes. This is the Tutorial Garage mission and the last entry in the quest.
Please note also that the above hasn't been fully tested, so it could use some tweaking. If so, please contact me via PM. You'll also need to put the name of the script (I have it saved as "k2_quest_update") in the Script slot that you put the parameters in. And all of those SendMessageToPC messages will be found on your Feedback screen in-game.