Hi Ricardo,
You can try this script, i am using Axapta COM Connector from
mssql
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[fnGetRecID]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[fnGetRecID]
GO
drop function [dbo].[fnGetRecID]
GO
CREATE FUNCTION fnGetRecID ()
RETURNS int
WITH ENCRYPTION
AS
BEGIN
DECLARE @object int
DECLARE @hr int
DECLARE @user varchar(255), @serverManager varchar(255)
DECLARE @objectServer varchar(255), @configuration varchar(255)
DECLARE @log int
DECLARE @MyObject int
DECLARE @retmyobject int
DECLARE @objrecidvalue int
DECLARE @recidValue int
RETURNS int
WITH ENCRYPTION
AS
BEGIN
DECLARE @object int
DECLARE @hr int
DECLARE @user varchar(255), @serverManager varchar(255)
DECLARE @objectServer varchar(255), @configuration varchar(255)
DECLARE @log int
DECLARE @MyObject int
DECLARE @retmyobject int
DECLARE @objrecidvalue int
DECLARE @recidValue int
set @user='admin' /*
You must change*/
set @serverManager=''
set @objectServer=''
set @configuration=''
set @serverManager=''
set @objectServer=''
set @configuration=''
EXEC @hr = sp_OACreate 'AxaptaCOMConnector.Axapta', @object OUT
EXEC @log = sp_OAMethod @object,'Logon',NULL , 'admin', '','',''
EXEC @MyObject = sp_OAMethod @object,'CreateObject',@retmyobject OUT, 'systemSequence'
EXEC @objrecidvalue=sp_OAMethod @retmyobject,'Call',@recidValue OUT,'nextVal'
RETURN(@recidValue)
END
END
Best regards,
Nana Mulyana
Software
Developer Team
PT. Daya Indosa Pratama
Web : http://www.dayaindosa.com
Tel
: +62-22-2503616
Fax : +62-22-2501673
e-mail
: [EMAIL PROTECTED]
From: Ricardo Cortés [mailto:[EMAIL PROTECTED]
Sent: 29 Maret 2005 05:19
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] URGENT!!!! RecId
Hi everyone,
I new in the development in Axapta, I need to make some records directly in
the Axapta tables, but i have a problem, because I don't know how Axapta
asign the field RecId; how is create the RecId?
I hope someone can help me
Thanks in advance
Ricardo Cortes
Interselect
Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 2GB en tu buzón de Correo Yahoo! por $100 al mes.
Sharing the knowledge on Axapta.
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.