Create a customer record using econnect
create Procedure spICB_CustomerIntegration as
Begin
Set nocount on
--exec spICB_CustomerIntegration
--select * from rm00101 where custnmbr='DJDJDJD'
declare @O_iErrorState int, @oErrString varchar(255), @errordesc nvarchar(100)
select @O_iErrorState = 0
if (@O_iErrorState = 0)
begin
exec taupdatecreatecustomerrcd
@I_vCustnmbr='DJDJDJD',
@I_vCustname='Devin Johnson3',
@I_vADRSCODE='PRIMARY',
@O_iErrorState = @O_ierrorstate output,
@oErrString = @oErrString output
end
IF @O_iErrorState <> 0
Begin
Set @errorDesc = (select errordesc from dynamics.dbo.taerrorcode where errorcode = @O_iErrorState)
select @oErrString
select @errorDesc
End
end