Super! This is a very big help for me!
Thanks! --- In Axapta-Knowledge-Village@yahoogroups.com, "Steen Rabol" <sra...@...> wrote: > > Yes a XML document as parameter > > > > > > e.g > > $xml = "<parameters>"; > > $xml .= ""<custaccount>1234567</custaccount>"; > > $xml .= "<custname>Customer name</custname>"; > > $xml .= "</parameters>"; > > > > Then > > > > $result = $axObj->CallStaticMethod("MyClass", "MyMethod", $xml); > > > > If($result == -1) > > Echo "Some ax errorÂ…"; > > Else > > Echo "Custname updated"; > > > > > > Then in AX, in class `MyClass' have a method > > > > Public static server int MyMethod(str param) > > { > > XmlDocument doc = XmlDocument(); > > XmlElement root,item; > > CustAccount custAccount; > > CustName custName; > > CustTable custTable; > > ; > > > > doc.loadXml(param); > > root = doc.getNamedElement(`parameters'); > > > > if(!root) > > { > > // Define your error codes > > return -1; > > } > > > > // Extract parameters > > custAccount = root.getNamedElement("custaccount").innerText(); > > custName = root.getNameElement("custname").innerText(); > > ttsbegin; > > custTable = CustTable::find(custAccount,true); > > custTable.name = custName; > > custTable.update(); > > ttscommit; > > > > return 1; // Ok > > } > > > > Hope that it help. > > > > Best > > Steen