Hi

Try re-coding your $record->put_Field('Name','somevalue') line as...

$record->Field('Name')='somevalue';

Regards

Malcolm Burtt
Touchstone
Our Trusted Solutions - Your Optimised Business



  _____ 

From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of joost_d_t
Sent: 23 December 2005 09:50
To: development-axapta@yahoogroups.com
Subject: [development-axapta] update in php


I'm trying to perform an update in php to change some fields in
axapta:

Code:
<?php
$axapta = new COM('AxaptaCOMConnector.Axapta2');
$axapta->Logon2
('user', 'pass', '', '', '', '', 't:\batch\axapta\axapta copy
nl.axc');
$record = $axapta->CreateRecord('CustTable');
$axapta->TTSBegin();
$record->ExecuteStmt("SELECT FORUPDATE %1 WHERE %1.AccountNum
== '3200000780'");
$record->put_Field('Name','somevalue');
$record->Update();
$axapta->TTSCommit();
$axapta->Logoff();
?>


When I run it I get this error:
Quote:
Warning: (null)(): Unable to lookup put_field: Unknown name. in
C:\web\update3.php on line 9


I also tried to use get_Field instead of put_Field but it gives the
same error.

When I use:

Code:
$record->Field('Name') = 'somevalue';


is get this error:

Quote:
Parse error: syntax error, unexpected '=' in C:\web\update3.php on
line 9


I have no problems using select queries and displaying data. I'm just
stuck changing and saving the data to axapta.

Anyone knows something that could help me or am I just overlooking
something?

Thx in advance.








SPONSORED LINKS
Computer part
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=P
rogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
ig=yLpvcLTIDJ5FTkRJGsO11w>        Programming languages
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+p
art&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4
&s=90&.sig=cuhEClK4dU4wapXFmKisbQ>        Microsoft axapta
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w
2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90
&.sig=yfeG_U6QaLfPOZZIud02Fg>       
Support exchange
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w
2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90
&.sig=hy8yRGMzrmxdphyITTUeqA>       

  _____ 

YAHOO! GROUPS LINKS


     
*      Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .


  _____ 




[Non-text portions of this message have been removed]





YAHOO! GROUPS LINKS




Reply via email to