Archives

 

We're about doing things faster. Even our articles are short. Get the the point, get out. 

I'm busy. 

But it's worth learning about Windows + V. You'll go faster. 

I restored a TEST Company from the LIVE company.

I misplaced the SQL company ID script I run after to synch up the sy00100 table and all tables with CompanyID, so I copied a script from Microsoft Docs.

It didn't work. Anybody have a working copy? - thanks in advance. Probably should save on resource page (I didn't see one)

Script - It errors around the double quotations -     UPPER(a.COLUMN_NAME) in 
               (
                  ''COMPANYID'',
                  ''CMPANYID''
               )

Here's the complete Script: 

if exists 
(
   select
      1 
   from
      INFORMATION_SCHEMA.COLUMNS 
   where
      TABLE_NAME = 'SY00100'
)
begin
   declare @Statement varchar(850) 
   select
      @Statement = 'declare @cStatement varchar(255)


      declare G_cursor CURSOR for 
      select
         case
            when
               UPPER(a.COLUMN_NAME) in 
               (
                  ''COMPANYID'',
                  ''CMPANYID''
               )
            then
               ''
               update
                  '' + a.TABLE_NAME + '' 
               set
                  '' + a.COLUMN_NAME + '' = '' + cast(b.CMPANYID as char(3)) 
               else
                  ''
                  update
                     '' + a.TABLE_NAME + '' 
                  set
                     '' + a.COLUMN_NAME + '' = '''''' + db_name() + '''''''' 
         end
                  from
                     INFORMATION_SCHEMA.COLUMNS a, '+rtrim(DBNAME)+'.dbo.SY01500 b 
                  where
                     UPPER(a.COLUMN_NAME) in 
                     (
                        ''COMPANYID'', ''CMPANYID'', ''INTERID'', ''DB_NAME'', ''DBNAME''
                     )
                     and b.INTERID = db_name() 
                     and COLUMN_DEFAULT is not null 
                     and rtrim(a.TABLE_NAME) + '' - '' + rtrim(a.COLUMN_NAME) <> ''SY00100 - DBNAME'' 
                  order by
                     a.TABLE_NAME 
                  set
                     nocount 
                     on OPEN G_cursor FETCH NEXT 
                  FROM
                     G_cursor INTO @cStatement WHILE (@@FETCH_STATUS <> - 1) 
                     begin
                        exec (@cStatement) FETCH NEXT 
                  FROM
                     G_cursor INTO @cStatement 
                     end
                     close G_cursor DEALLOCATE G_cursor 
                  set
                     nocount off'


                  from
                     SY00100 exec (@Statement) 
end
else
   begin
      declare @cStatement varchar(255) 
      declare G_cursor CURSOR for 
      select
         case
            when
               UPPER(a.COLUMN_NAME) in 
               (
                  'COMPANYID',
                  'CMPANYID'
               )
            then
               'update ' + a.TABLE_NAME + ' set ' + a.COLUMN_NAME + ' = ' + cast(b.CMPANYID as char(3)) 
            else
               'update ' + a.TABLE_NAME + ' set ' + a.COLUMN_NAME + ' = ''' + db_name() + '''' 
         end
      from
         INFORMATION_SCHEMA.COLUMNS a, DYNAMICS.dbo.SY01500 b 
      where
         UPPER(a.COLUMN_NAME) in 
         (
            'COMPANYID', 'CMPANYID', 'INTERID', 'DB_NAME', 'DBNAME'
         )
         and b.INTERID = db_name() 
         and COLUMN_DEFAULT is not null 
      order by
         a.TABLE_NAME 
      set
         nocount 
         on OPEN G_cursor FETCH NEXT 
      FROM
         G_cursor INTO @cStatement WHILE (@@FETCH_STATUS <> - 1) 
         begin
            exec (@cStatement) FETCH NEXT 
      FROM
         G_cursor INTO @cStatement 
         end
         close G_cursor DEALLOCATE G_cursor 
      set
         nocount off 
   end

 

 

Okay -

Script:

(select
CUSTNMBR, 
APTODCNM, 
CUSTNMBR,  
CASE WHEN APFRDCTY='9' then sum(APPTOAMT) else '0' end as Cash,
CASE WHEN APFRDCTY='8' then sum(APPTOAMT) else '0' end as Credits1,
CASE WHEN APFRDCTY='7' then sum(APPTOAMT) else '0' end as Credits2
from RM30201 A 
where APTODCTY='1' and APTODCNM like 'REF%' AND DATE1 >= '2017-01-01' and APTODCNM = 'REF371277'
GROUP BY CUSTNMBR, APTODCNM, APFRDCTY) BT

Returns: Multiple lines for a single document (with two payment types)

I would like the dataset to be a singular line regardless of multiple payments and payment types. I think I need a cross join RM30201 to itself.........having a hard time getting started. 

 

Thanks in advance, 

Bron

Hi,

We want to access Microsoft Dynamics GP 2018 from our Java application through SOAP request.  We are trying to access it via SOAP request using WSDL, but our request is failing with authorization issue. We are not sure about the namespace to use, we could not see the namespace details and how to send the request with proper namespace. We don't want to use econnect and  C# service based agents.

We are getting below error while accessing the service through Postman, (we have set the username and password in the authorization section):

"This error means that the security context token is either expired or is invalid, and the message was not processed. When a security session is established between servers, there is a one-time initial step that exchanges asymmetrically encrypted message"

Could you please advise how to access via SOAP request?

Is it possible to access GP 2018 from Java via SOAP request without using .Net?

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3