Hi,
Thank you for your reply. I want my webservices to inject directly into AX (I got merge functionality on my website which checks for duplicates). I have done this for customer, addresses, salesorderline, misc. charges, check on balance total, but I miss the contact information like email, phone numbers, username (own defined communication) and I miss the birthdate and gender injection. I certainly do not want to create Excels since the webshop has next-day delivery :-). I even want to move my webservice into a job/ batch? and have it processed every minute. Last but not least I want to inject the prepayment done by the customer online ( I will create other post for it).
J.
// Global::info(custTable.Name + " - " + custTable.AccountNum);
// Party
/* if (!custTable.PartyId)
{
custTable.PartyId = DirParty::createPartyFromCommon(custTable).PartyId;
}
else
{
dirParty = DirParty::constructFromPartyId(custTable.PartyId);
dirParty.parmAnniversaryDate(customer.get_BirthDay());
dirParty.parmGender(Gender::Male);
DirParty::updateCommInfoFromParty(dirParty);
//DirParty::updatePartyFromCommonInsert(custTable.PartyId, custTable);
}
*/
//Global::info(custTable.PartyId);
//debug
//dirParty.
// //dirParty.parmAnniversaryDate(customer.get_BirthDay());
// dirParty = new DirParty(CustTable);
// dirParty.initFromCustTable(custTable);
//redundant dirParty.initializePersonInfo();
// tempCLRObject = customer.get_BirthDay();
// if(tempCLRObject)
// dirParty.parmBirthDate(tempCLRObject);
// custTable.update(false, true);
// dirParty.updateCommonFromDirparty(dirParty.getTableId());
// dirParty.parmGender(Gender::Female);
//dirParty.updateCommonFromDirparty(custTable.TableId);
//DirParty::updatePartyFromCommon(custTable.PartyId, custTable);
// tempCLRObject = customer.get_Cell();
//fieldId = DirECommunicationAddress::type2FieldId(DirECommunicationTypeTable::find(this.eCommunicationTypeId).MethodType);
// dirECommunicationTypeTable = DirECommunicationTypeTable::findBySystemType(DirSystemECommunicationType::CellularPhone, true);
// if(!dirECommunicationTypeTable)
// {
// dirECommunicationTypeTable.initValue();
// // dirECommunicationTypeTable.
// dirECommunicationTypeTable.insert();
// }
// dirECommunicationAddress.initValue();
// dirECommunicationAddress.initFromDirParty(dirParty, DirSystemECommunicationType::CellularPhone);
// dirECommunicationAddress. = DirSystemECommunicationType::CellularPhone;
// if(tempCLRObject)
// dirECommunicationAddress.editCommunicationValue(true, tempCLRObject);
// else
// dirECommunicationAddress.delete();
// dirECommunicationAddress.update(true);
//
//// dirECommunicationAddress.initFromDirParty(dirParty, DirSystemECommunicationType::CellularPhone);
//// dirECommunicationAddress.initFromDirParty(dirParty, DirSystemECommunicationType::PrimaryPhone);
//// dirECommunicationAddress.initValue();
////
// { //no match found --> update webserver merge state.
//
// Global::warning("Invoice address not found");
// //soapClient.UpdateAddressSyncState(credentialSoapHeader, addressId, bBaytDataExchangeServer.SyncStateEnum::SyncError);
// //soapClient.UpdateSalesOrderSyncState(credentialSoapHeader, salesOrderId, bBaytDataExchangeServer.SyncStateEnum::SyncError);
// //addressMap
// }
// else
// {
// addressInvoice = addressMap;
// }
// //AddressMap::
// //AddressZipCode::findBestMatch(
// }
try
{
salesOrderLines = soapClient.GetSalesOrderLinesBySalesOrderId(credentialSoapHeader, salesOrderId);
}
catch(Exception::CLRError)
{
Global::error("GetSalesOrderLinesBySalesOrderId through webservice failed for %1.");
throw error(AifUtil::getClrErrorMessage());
}