This topic is locked
[SOLVED]

 getMasterRecord() New Record

5/14/2020 2:12:45 PM
PHPRunner General questions
R
RBrogen author

I just realized that previous topic I created the code below with help from my previous post https://asprunner.com/forums/topic/27396-getmasterrecord-question/ and it works perfect on an Order form that has been saved and you are editing. However, when I add a New Order, the client_FK value is not accessible this way because the record isn't saved yet and it returns a value of Undefined. Any guidance on accessing the value selected in a field on the form that hasn't been saved would be greatly appreciated.
My current configuration is:
PAYMENT DETAILS LIST PAGE: Before Process

$mstrData = $pageObject->getMasterRecord();

$_SESSION["client_ID"]=$mstrData["client_FK"];
Field Blur Event: Server Section

$rs=DB::Query("select client_FirstName, client_LastName from dbo.CLIENTS WHERE client_ID ='".$_SESSION['client_ID']."'" );
while ( $data=$rs->fetchAssoc()){

$result["clientFirstName"]=$data['client_FirstName'];

$result["clientLastName"]=$data['client_LastName'];
}
Thanks

R
RBrogen author 5/16/2020

Please close this topic .... I had an epiphany and figured it out! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=91333&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />