Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script that was working now isn't but no errors are returned...???

Featured Replies

I've got a basic insert record script setup that was working when I initially set it up and now I can't get anything out of it. Not an error, not a new record. Here's what I'm working with:


<?php

include_once('FileMaker.php');



// Open file outside of web root which contains FM credentials.  This is for security purposes.

$FMCredentialsPath = "C:PATH_TOfmCredentials.xml";

if(!$FMCredentials = simplexml_load_file($FMCredentialsPath))

	exit("There was an error opening the credentials file");

	

$APIUsername = $FMCredentials -> APIUsername;

$APIPassword = $FMCredentials -> APIPassword;



define('FM_HOST', 'filemaker.ourdomain.com');

define('FM_USER', $APIUsername);

define('FM_PASS', $APIPassword);

define('FM_FILE', 'Invoices');



$FMSession = new FileMaker(FM_FILE, FM_HOST, FM_USER, FM_PASS);



$FMDisputeRecordFields = array(

								'txn_id' => '123456789', 

								'txn_type' => 'new_case', 

								'case_id' => 'PP-123-456', 

								'case_type' => 'Dispute', 

								'reason_code' => 'Non-receipt', 

								'status' => 'Open'

							   );

							   

$FMDisputeRecord = $FMSession -> createRecord('PayPalDisputesDev', $FMDisputeRecordFields);

$FMDisputeRecord -> commit();

		

if (FileMaker::isError($FMDisputeRecord)) 

{	



	echo $FMDisputeRecord -> getMessage();

	

	$mail -> Subject  =  'FileMaker Error Adding New Dispute';

	$mail -> Body =  "Error: " . $FMDisputeRecord -> getMessage();

	$mail -> AddAddress("[email protected]", "Andrew Angell");

	$mail -> Send();

}

else

	echo "FM Insert command completely successfuly.";

?>

When I run that I'm getting the message that the command completely successfully. When I look at the DB, though, no new record is getting created.

When I first wrote this yesterday it was working for me. Any information on what might be going on here would be greatly appreciated. Thanks!

Edited by Guest

  • Author

Doh! This gets me every single time! Man it's hard to get used to this.

I had this all setup and working like I said, and then I did end up adding a new field into the DB and I also added the new field into my script's insert code. However, I did NOT add the new field to the actual layout that I was hitting with this particular script.

I don't know why I wasn't getting an error back but I re-write a new script and then I did get a "field not found" error which is when it dawned on me.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.