Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6153 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Trying out the new 9.0 web PHP. In 6.0, I used to put a "-script" tag and run the script after I create a new record. The script sets fields in the record after it is created. In PHP, I put this in the confirmation page:

$recid = $record->getField('current_record_ID', 0);

$findCommand =& $fm->newFindCommand('WebRegistration');

$findCommand->addFindCriterion('current_record_ID', $recid);

$findCommand->setPreSortScript('TEST2','22');

$result = $findCommand->execute();

The script runs and changes the field in the database, but what is displayed on the confirmation page is the value before the script is run.

Also, do I need to do the findcommand?

-Thanks!

Posted

After you run the find, do you refresh the PHP variables in your web page before displaying the confirmation information?

Below is a sample that works successfully for me:

$BillingActivate=new FX($serverIP,$webCompanionPort);

$BillingActivate->SetDBData($fmFile,'webngUsers', $groupSize);

$BillingActivate->SetDBPassword($webPassword,$webUser);

$BillingActivate->AddDBParam('KEY',$KEY);

$BillingActivate->AddDBParam('-script.presort','LocalActivateAcc');

$BillingActivateResult=$BillingActivate->FMfind();

foreach( $BillingActivateResult[ 'data' ] as $key => $activateData ) {

$recid = $activateData['recid'][0];

$UID = $activateData['UID'][0];

$KEY = $activateData['KEY'][0];

$Organisation = $activateData['Organisation'][0];

$nameFirst = $activateData['NameFirst'][0];

$nameLast = $activateData['NameLast'][0];

... etc etc

}

... now generate the necessary HTML including the changed variables you want to display on the confirmation page.

HTH

This topic is 6153 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.