Discussion:
Emailing Statement error
(too old to reply)
Joel
2009-05-11 18:55:01 UTC
Permalink
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.

Regards, Joel :)
Mariano Gomez
2009-05-11 19:10:09 UTC
Permalink
Is this server also running SQL Server?

Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Joel
2009-05-11 19:41:01 UTC
Permalink
No
Post by Mariano Gomez
Is this server also running SQL Server?
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Joel
2009-05-11 19:59:04 UTC
Permalink
One thing I didn't said, is on last friday I had only 1 gig of memory, with
the error message I have put 3 other gigs into the machine and redid a test
on friday and on Sunday same error.

Joel
No
Post by Mariano Gomez
Is this server also running SQL Server?
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Mariano Gomez
2009-05-11 20:31:01 UTC
Permalink
Is Windows effectively recognizing all 4 GB of RAM?

Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
One thing I didn't said, is on last friday I had only 1 gig of memory, with
the error message I have put 3 other gigs into the machine and redid a test
on friday and on Sunday same error.
Joel
No
Post by Mariano Gomez
Is this server also running SQL Server?
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Victoria [MVP]
2009-05-12 11:38:34 UTC
Permalink
Besides physically adding the memory, did you make any other changes? Like
adjusting the page file?
--
Victoria Yudin
Dynamics GP MVP
Flexible Solutions - home of GP Reports
http://www.flex-solutions.com/gpreports.html
blog: http://www.victoriayudin.com
Post by Joel
One thing I didn't said, is on last friday I had only 1 gig of memory, with
the error message I have put 3 other gigs into the machine and redid a test
on friday and on Sunday same error.
Joel
No
Post by Mariano Gomez
Is this server also running SQL Server?
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Joel
2009-05-12 17:10:01 UTC
Permalink
No
Post by Victoria [MVP]
Besides physically adding the memory, did you make any other changes? Like
adjusting the page file?
--
Victoria Yudin
Dynamics GP MVP
Flexible Solutions - home of GP Reports
http://www.flex-solutions.com/gpreports.html
blog: http://www.victoriayudin.com
Post by Joel
One thing I didn't said, is on last friday I had only 1 gig of memory, with
the error message I have put 3 other gigs into the machine and redid a test
on friday and on Sunday same error.
Joel
No
Post by Mariano Gomez
Is this server also running SQL Server?
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Bonjour!
we have GP 10 running on a terminal server with 4 gigs of memory. I'm trying
to send our Statement (one customer) by email and when I print them I receive
an Insufficient Memory Error message. "Could not e-mail Status Report to
Sender, Insufficient Memory" Event if I'm alone on the server it does that.
Regards, Joel :)
Janakiram M.P.
2009-05-11 20:01:29 UTC
Permalink
Joel

Can You go and Check in Reprint Statements Window, by chance, there
are too many statements piled up there. If Yes, I'd suggest to delete
some old ones.
(Routines=>Sales=>Reprint Statements)

Thanks
Janakiram M.P.
MCP-GP
Joel
2009-05-12 17:12:01 UTC
Permalink
There were a lot of reprints, I'm in the test company I have deleted
everything.
Still not working.

Joel
Post by Janakiram M.P.
Joel
Can You go and Check in Reprint Statements Window, by chance, there
are too many statements piled up there. If Yes, I'd suggest to delete
some old ones.
(Routines=>Sales=>Reprint Statements)
Thanks
Janakiram M.P.
MCP-GP
Janakiram M.P.
2009-05-12 18:23:16 UTC
Permalink
Joel

I am coming to a closer conclusion it has to do with Insufficient
memory related to Terminal Server. Now, What I'd suggest you is to go
to Event Viewer and check the logs which should definitely list the
error. Just let us know what errors are listed in Event viewer. (Will
be available under Administrative Tools)

This should narrow down to the exact error, I guess

Thanks
Janakiram M.P.
MCP-GP
Post by Joel
There were a lot of reprints, I'm in the test company I have deleted
everything.
Still not working.
Joel
Post by Janakiram M.P.
Joel
Can You go and Check in Reprint Statements Window, by chance, there
are too many statements piled up there. If Yes, I'd suggest to delete
some old ones.
(Routines=>Sales=>Reprint Statements)
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Joel
2009-05-12 18:55:02 UTC
Permalink
Janakiram,
The only place there is something it's on the System in the event viewer.
There are no errors. The Dialog box with the Insufficient memory error, is
only an information dialog box.

Joel
Event Type: Information
Event Source: Print
Event Category: None
Event ID: 10
Date: 05/12/2009
Time: 2:44:01 PM
User: joe
Computer: TERMSRV
Description:
Document 84, RM Email Statements Report owned by joe was printed on Adobe
PDF via port c:\transfer\reports\BUTES\Microsoft Dynamics
GP\DYNSA\StmtStatus\EmailStmtStatus_20090512_04.ps. Size in bytes: 0; pages
printed: 1

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Event Type: Information
Event Source: Print
Event Category: None
Event ID: 10
Date: 05/12/2009
Time: 2:43:59 PM
User: joe
Computer: TERMSRV
Description:
Document 83, RM Statement User Definable Form owned by joe was printed on
Adobe PDF via port C:\DOCUME~1\sqladmin\LOCALS~1\Temp\7\BUTES\Microsoft
Dynamics GP\DYNSA\rmStmt_2071659_00.ps. Size in bytes: 0; pages printed: 3

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Post by Janakiram M.P.
Joel
I am coming to a closer conclusion it has to do with Insufficient
memory related to Terminal Server. Now, What I'd suggest you is to go
to Event Viewer and check the logs which should definitely list the
error. Just let us know what errors are listed in Event viewer. (Will
be available under Administrative Tools)
This should narrow down to the exact error, I guess
Thanks
Janakiram M.P.
MCP-GP
Post by Joel
There were a lot of reprints, I'm in the test company I have deleted
everything.
Still not working.
Joel
Post by Janakiram M.P.
Joel
Can You go and Check in Reprint Statements Window, by chance, there
are too many statements piled up there. If Yes, I'd suggest to delete
some old ones.
(Routines=>Sales=>Reprint Statements)
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Mariano Gomez
2009-05-12 20:05:03 UTC
Permalink
Joel,

Let's try something else.

1. Close Dynamics GP. Go to Start > Run and type %temp%. Clear all the files
in the temp directory.

2. Start GP and attempt to print again.

Have you looked at your Task Manager to see memory usage during this process?

Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joel
Janakiram,
The only place there is something it's on the System in the event viewer.
There are no errors. The Dialog box with the Insufficient memory error, is
only an information dialog box.
Joel
Event Type: Information
Event Source: Print
Event Category: None
Event ID: 10
Date: 05/12/2009
Time: 2:44:01 PM
User: joe
Computer: TERMSRV
Document 84, RM Email Statements Report owned by joe was printed on Adobe
PDF via port c:\transfer\reports\BUTES\Microsoft Dynamics
GP\DYNSA\StmtStatus\EmailStmtStatus_20090512_04.ps. Size in bytes: 0; pages
printed: 1
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Event Type: Information
Event Source: Print
Event Category: None
Event ID: 10
Date: 05/12/2009
Time: 2:43:59 PM
User: joe
Computer: TERMSRV
Document 83, RM Statement User Definable Form owned by joe was printed on
Adobe PDF via port C:\DOCUME~1\sqladmin\LOCALS~1\Temp\7\BUTES\Microsoft
Dynamics GP\DYNSA\rmStmt_2071659_00.ps. Size in bytes: 0; pages printed: 3
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Post by Janakiram M.P.
Joel
I am coming to a closer conclusion it has to do with Insufficient
memory related to Terminal Server. Now, What I'd suggest you is to go
to Event Viewer and check the logs which should definitely list the
error. Just let us know what errors are listed in Event viewer. (Will
be available under Administrative Tools)
This should narrow down to the exact error, I guess
Thanks
Janakiram M.P.
MCP-GP
Post by Joel
There were a lot of reprints, I'm in the test company I have deleted
everything.
Still not working.
Joel
Post by Janakiram M.P.
Joel
Can You go and Check in Reprint Statements Window, by chance, there
are too many statements piled up there. If Yes, I'd suggest to delete
some old ones.
(Routines=>Sales=>Reprint Statements)
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Janakiram M.P.
2009-05-12 20:08:17 UTC
Permalink
Joel

I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.



Thanks
Janakiram M.P.
MCP-GP
Janakiram M.P.
2009-05-12 20:19:57 UTC
Permalink
Joel

For your convenience, I'm posting a Troubleshoot site for Adobe PDF
which can be referred as a source to identify where it is causing
issue for you

http://kb2.adobe.com/cps/316/316508.html

Thanks
Janakiram M.P.
MCP-GP
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP
Joe
2009-05-13 13:10:01 UTC
Permalink
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors.
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.

Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP
Janakiram M.P.
2009-05-13 13:20:26 UTC
Permalink
Joel

Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening

Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors.
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Joe
2009-05-13 13:44:11 UTC
Permalink
Thanks Janakiram

The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...

Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors..
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Mariano Gomez
2009-05-13 18:16:02 UTC
Permalink
This is because your intercompany ID is incorrect for your transactions in
the PM10100.

-- run against your test company
SELECT INTERID FROM PM10100

You can compare this result against the value stored in the company master
table
SELECT * FROM DYNAMICS..SY01500

If the PM10100 values are incorrect you will need to update accordingly. If
the company master is incorrect (based on the physical database that it
should be pointing to) you will need to update the company master.

Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joe
Thanks Janakiram
The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...
Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors..
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Joe
2009-05-13 18:29:01 UTC
Permalink
You are awsome guys helping me like that. I did what you said but it is OK, I
think too, it is something to do with the link with the real database. One
guy gave me a script to run after a restore of a test company but even with
that I still have that error.

Regards, Joel :)

/******************************************************************************/
/* Description: */
/* Updates any table that contains a company ID or database name value */
/* with the appropriate values as they are stored in the
DYNAMICS.dbo.SY01500 table */
/* */
/******************************************************************************/

if not exists(select 1 from tempdb.dbo.sysobjects where name =
'##updatedTables')
create table [##updatedTables] ([tableName] char(100))
truncate table ##updatedTables
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,
INFORMATION_SCHEMA.TABLES c
where UPPER(a.COLUMN_NAME) in
('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME', 'COMPANYCODE_I')
and b.INTERID = db_name() and a.TABLE_NAME = c.TABLE_NAME and
c.TABLE_CATALOG = db_name() and c.TABLE_TYPE = 'BASE TABLE'
set nocount on
OPEN G_cursor
FETCH NEXT FROM G_cursor INTO @cStatement
WHILE (@@FETCH_STATUS <> -1)
begin
insert ##updatedTables select
substring(@cStatement,8,patindex('%set%',@cStatement)-9)
Exec (@cStatement)
FETCH NEXT FROM G_cursor INTO @cStatement
end
DEALLOCATE G_cursor
select [tableName] as 'Tables that were Updated' from ##updatedTables
Post by Mariano Gomez
This is because your intercompany ID is incorrect for your transactions in
the PM10100.
-- run against your test company
SELECT INTERID FROM PM10100
You can compare this result against the value stored in the company master
table
SELECT * FROM DYNAMICS..SY01500
If the PM10100 values are incorrect you will need to update accordingly. If
the company master is incorrect (based on the physical database that it
should be pointing to) you will need to update the company master.
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joe
Thanks Janakiram
The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...
Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors..
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Robert Cavill
2009-05-14 02:01:54 UTC
Permalink
Here is the code I execute after restoring the production company to the
test company.
This fixes the INTERID field on the most likely tables that may have
unposted transactions, thus allowing them to post in the TEST company.

Within the code, you have to make only 2 changes.

USE TEST <-- change to the test database

'<YOUR PRODUCTION DATABASE>' <-- change to the name of the production
database

Robert

/* ------------ start script ------------- */
begin tran

declare @thisID integer, @thisDB varchar(5)

declare @oldID integer, @oldDB varchar(5)

declare @anyerror integer

set @anyerror = 0

use TEST /* the <TEST database> */

select @thisID = CMPANYID, @thisDB = INTERID from DYNAMICS.dbo.SY01500 where
INTERID = db_name()

if @@ROWCOUNT <> 1 set @anyerror = @anyerror + 1 + @@ERROR

select @oldID = CMPANYID, @oldDB = INTERID from DYNAMICS.dbo.SY01500 where
INTERID = '<YOUR PRODUCTION DATABASE>'

if @@ROWCOUNT <> 1 set @anyerror = @anyerror + 1 + @@ERROR

UPDATE .dbo.SY00600 set CMPANYID = @thisID

set @anyerror = @anyerror + @@ERROR

UPDATE .dbo.SY01200 set Master_ID = @thisID where Master_Type=''CMP''

set @anyerror = @anyerror + @@ERROR

if not exists (select CMPANYID from FA49900 where CMPANYID = @thisID) UPDATE
.dbo.FA49900 set CMPANYID = @thisID

set @anyerror = @anyerror + @@ERROR

UPDATE .dbo.GL10001 set INTERID = @thisDB where INTERID = @oldDB /* leave
intercompany as is! */

set @anyerror = @anyerror + @@ERROR

UPDATE .dbo.PM10100 set INTERID = @thisDB where INTERID = @oldDB /* leave
intercompany as is! */

set @anyerror = @anyerror + @@ERROR

UPDATE .dbo.CM00100 set CMPANYID = @thisID where CMPANYID = @oldID

set @anyerror = @anyerror + @@ERROR

UPDATE .dbo.SY04800 set CMPANYID = @thisID where CMPANYID = @oldID

set @anyerror = @anyerror + @@ERROR

if @anyerror = 0

begin

commit tran

end

else begin

rollback

end

/* ------------ end script ------------- */
Post by Joe
You are awsome guys helping me like that. I did what you said but it is OK, I
think too, it is something to do with the link with the real database. One
guy gave me a script to run after a restore of a test company but even with
that I still have that error.
Regards, Joel :)
/******************************************************************************/
/* Description: */
/* Updates any table that contains a company ID or database name value */
/* with the appropriate values as they are stored in the
DYNAMICS.dbo.SY01500 table */
/* */
/******************************************************************************/
if not exists(select 1 from tempdb.dbo.sysobjects where name =
'##updatedTables')
create table [##updatedTables] ([tableName] char(100))
truncate table ##updatedTables
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,
INFORMATION_SCHEMA.TABLES c
where UPPER(a.COLUMN_NAME) in
('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME', 'COMPANYCODE_I')
and b.INTERID = db_name() and a.TABLE_NAME = c.TABLE_NAME and
c.TABLE_CATALOG = db_name() and c.TABLE_TYPE = 'BASE TABLE'
set nocount on
OPEN G_cursor
begin
insert ##updatedTables select
end
DEALLOCATE G_cursor
select [tableName] as 'Tables that were Updated' from ##updatedTables
Post by Mariano Gomez
This is because your intercompany ID is incorrect for your transactions in
the PM10100.
-- run against your test company
SELECT INTERID FROM PM10100
You can compare this result against the value stored in the company master
table
SELECT * FROM DYNAMICS..SY01500
If the PM10100 values are incorrect you will need to update accordingly. If
the company master is incorrect (based on the physical database that it
should be pointing to) you will need to update the company master.
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joe
Thanks Janakiram
The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...
Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is related to the
backup restore because I don't have a problem in the real company. When we do
a payable new entry in the test, when we try to save our entry it tells us
this transaction won't post because it includes distributions with errors..
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Joe
2009-05-14 13:46:01 UTC
Permalink
Thanks Guys, I really appreciate it. Those issues was bugging us for months
now.

Regards, Joel :)
Post by Robert Cavill
Here is the code I execute after restoring the production company to the
test company.
This fixes the INTERID field on the most likely tables that may have
unposted transactions, thus allowing them to post in the TEST company.
Within the code, you have to make only 2 changes.
USE TEST <-- change to the test database
'<YOUR PRODUCTION DATABASE>' <-- change to the name of the production
database
Robert
/* ------------ start script ------------- */
begin tran
use TEST /* the <TEST database> */
INTERID = db_name()
INTERID = '<YOUR PRODUCTION DATABASE>'
intercompany as is! */
intercompany as is! */
begin
commit tran
end
else begin
rollback
end
/* ------------ end script ------------- */
Post by Joe
You are awsome guys helping me like that. I did what you said but it is OK, I
think too, it is something to do with the link with the real database. One
guy gave me a script to run after a restore of a test company but even with
that I still have that error.
Regards, Joel :)
/******************************************************************************/
/* Description: */
/* Updates any table that contains a company ID or database name value */
/* with the appropriate values as they are stored in the
DYNAMICS.dbo.SY01500 table */
/* */
/******************************************************************************/
if not exists(select 1 from tempdb.dbo.sysobjects where name =
'##updatedTables')
create table [##updatedTables] ([tableName] char(100))
truncate table ##updatedTables
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,
INFORMATION_SCHEMA.TABLES c
where UPPER(a.COLUMN_NAME) in
('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME', 'COMPANYCODE_I')
and b.INTERID = db_name() and a.TABLE_NAME = c.TABLE_NAME and
c.TABLE_CATALOG = db_name() and c.TABLE_TYPE = 'BASE TABLE'
set nocount on
OPEN G_cursor
begin
insert ##updatedTables select
end
DEALLOCATE G_cursor
select [tableName] as 'Tables that were Updated' from ##updatedTables
Post by Mariano Gomez
This is because your intercompany ID is incorrect for your transactions in
the PM10100.
-- run against your test company
SELECT INTERID FROM PM10100
You can compare this result against the value stored in the company master
table
SELECT * FROM DYNAMICS..SY01500
If the PM10100 values are incorrect you will need to update accordingly. If
the company master is incorrect (based on the physical database that it
should be pointing to) you will need to update the company master.
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com
Post by Joe
Thanks Janakiram
The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...
Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help
me enough
it's alrigth. I do a backup of the real company and restore to the test
company with SQL 2005, I have a problem in the payables, it is
related to the
backup restore because I don't have a problem in the real company.
When we do
a payable new entry in the test, when we try to save our entry it
tells us
this transaction won't post because it includes distributions with
errors..
But before we save the distributions are OK. We have GP10 and Analytical
Accounting.
I have posted this but the last solution was to download the debug
tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The
issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -
Janakiram M.P.
2009-05-14 14:10:11 UTC
Permalink
Joe,

Good to hear that You have your issues resolved through Newsgroups

Thanks
Janakiram M.P.
MCP-GP
Post by Joe
Thanks Guys, I really appreciate it. Those issues was bugging us for months
now.
Regards, Joel :)
Post by Robert Cavill
Here is the code I execute after restoring the production company to the
test company.
This fixes the INTERID field on the most likely tables that may have
unposted transactions, thus allowing them to post in the TEST company.
Within the code, you have to make only 2 changes.
USE TEST  <-- change to the test database
'<YOUR PRODUCTION DATABASE>'  <-- change to the name of the production
database
Robert
/* ------------ start script ------------- */
begin tran
use TEST    /* the <TEST database> */
INTERID = db_name()
INTERID = '<YOUR PRODUCTION DATABASE>'
intercompany as is! */
intercompany as is! */
begin
commit tran
end
else begin
rollback
end
/* ------------ end script ------------- */
Post by Joe
You are awsome guys helping me like that. I did what you said but it is OK, I
think too, it is something to do with the link with the real database. One
guy gave me a script to run after a restore of a test company but even with
that I still have that error.
Regards, Joel :)
/**************************************************************************­****/
/* Description: */
/* Updates any table that contains a company ID or database name value */
/* with the appropriate values as they are stored in the
DYNAMICS.dbo.SY01500 table */
/* */
/**************************************************************************­****/
if not exists(select 1 from tempdb.dbo.sysobjects where name =
'##updatedTables')
create table [##updatedTables] ([tableName] char(100))
truncate table ##updatedTables
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,
INFORMATION_SCHEMA.TABLES c
where UPPER(a.COLUMN_NAME) in
('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME', 'COMPANYCODE_I')
and b.INTERID = db_name() and a.TABLE_NAME = c.TABLE_NAME and
c.TABLE_CATALOG = db_name() and c.TABLE_TYPE = 'BASE TABLE'
set nocount on
OPEN G_cursor
begin
 insert ##updatedTables select
end
DEALLOCATE G_cursor
select [tableName] as 'Tables that were Updated' from ##updatedTables
Post by Mariano Gomez
This is because your intercompany ID is incorrect for your transactions in
the PM10100.
-- run against your test company
SELECT INTERID FROM PM10100
You can compare this result against the value stored in the company master
table
SELECT * FROM DYNAMICS..SY01500
If the PM10100 values are incorrect you will need to update accordingly. If
the company master is incorrect (based on the physical database that it
should be pointing to) you will need to update the company master.
Best regards,
--
MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com
The Dynamics GP Blogster athttp://dynamicsgpblogster.blogspot.com
Post by Joe
Thanks Janakiram
The worst thing is the accounts I'm using for the transaction I'm creating
are not linked with AA. If I click on the ribbon the message is there are no
account linked...
Joel :)
Post by Janakiram M.P.
Joel
Good to know that You got it back. Now, Coming back to your other
issue, this error message comes when you have Analytical Accounting
installed. Have a look at your Analytical Distributions and something
must be wrong with them and they are not distributing properly. This
is why it is allowing you to post though it says distributions with
errors. Go to that entry and click on the ribbon button for viewing AA
distributions and You should be knowing what's happening
Thanks
Janakiram M.P.
MCP-GP
Post by Joe
WoW! I extremely appreciate your work, it was the adobe setting.
Can I push my luck more, if you don't know just tell me, you help
me enough
it's alrigth. I do a backup of the real company and restore to the
test
company with SQL 2005, I have a problem in the payables, it is
related to the
backup restore because I don't have a problem in the real company.
When we do
a payable new entry in the test, when we try to save our entry it
tells us
this transaction won't post because it includes distributions with
errors..
But before we save the distributions are OK. We have GP10 and
Analytical
Accounting.
I have posted this but the last solution was to download the debug
tool but
I'm a customer and I don't have access to the Partner source.
Regards, Joel :)
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long
back
when we used to print payroll related documents remotely. The
issue is
with Adobe PDF. Just check your PDF settings. Just check if you
have
Do not Send Post scripts is marked or not. This might be the
culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Michael Wright
2009-07-29 14:03:01 UTC
Permalink
I'm seeing this error as well. Do you have any idea what PDF settings I
should check?
Post by Janakiram M.P.
Joel
I remember we used to face this issue for one of my clients long back
when we used to print payroll related documents remotely. The issue is
with Adobe PDF. Just check your PDF settings. Just check if you have
Do not Send Post scripts is marked or not. This might be the culprit.
Whatever it is, Check once again all your PDF settings.
Thanks
Janakiram M.P.
MCP-GP
Loading...