another blog

Icon

About Microsoft Dynamics GP :-)

How to find, due to which Dynamics GP User sql stored procedure is calling?

Often we need to pass user id and intercompany id to sql stored procedure to do some data selection from custom tables or to maintain the log regarding user activity. This happens with us with one custom window of Dynamics GP, in the beginning our stored procedure didn’t need user id and intercompany id parameters and was working fine but with the client requirement changes at some point we needed to pass these two parameters, adding parameters means creating chunk and deployment to all machines, which was not possible as users were connected and updated was necessary as it was hindering there routine work.

We can get intercompany id easily by using   select dB_name() but we also needed to find the Dynamics GP user who is calling the stored procedure. To find that user we use this function inside our stored procedure and in this way  avoid updating chunk.

SUSER_SNAME()

This will returned the login dynamics gp user id when stored procedure will be called from GP.

Filed under: Dexterity Development, SQL,

How to find if specific field exist on window at run time.

Someone asked me this, may it possible to find if some specific field exist on gp window at run time?

I think yes we can find out by doing following trick, I don’t know the beginning and end of the story that why he needs to find out this. Here is a code.

local string s;
local string compiler_error;

s=”open form SOP_Entry. lock Almas of window SOP_Entry of form SOP_Entry.”;
execute(s,compiler_error);
if compiler_error<>”” then
{do nothing}
else
{disable field}
end if;

This can also be checked by exception handling if you know your exception.

check this link

https://www.facebook.com/notes/evincible-solutions/how-to-make-focus-trigger-script-run-only-when-alternate-window-is-marked/404705122918129

Filed under: Can i, Dexterity Development,

General Entry Batch Posting Issue.

For one of our client there were getting issues on posting general entry batches.One checking the transaction status some of them were in Receiving state.

Image

This is how we solved the issue.

For this issue we will check in batch headers table SY00500,

For current condition it saying batch is in receiving status which is 3.

0 – Available – BATCH_AVAILABLE
1 – Marked to Post – BATCH_POSTING
2 – Marked to Delete – BATCH_DELETING
3 – Marked to Receive – BATCH_RECEIVING
4 – BATCH_DONE_POSTING
5 – BATCH_PRINTING
6 – BATCH_UPDATING
7 – BATCH_POSTING_INCOMPLETE
8 – BATCH_PRINTING_INCOMPLETE
9 – BATCH_UPDATING_INCOMPLETE
10- BATCH_RECURRING_INCOMPLETE
11 – BATCH_POSTED_WITH_ERROR

Check in sy00500 table with BCHSTTUS=3 and BCHSOURC=’GL_Normal’,  find out the users having issue, Ask them to properly logout of the GP.

  • select BCHSTTUS,USERID,* from sy00500 where BCHSTTUS=3 and BCHSOURC=’GL_Normal’

Check troubled users in these two tables, since users are logout of GP there should be no records on it. But if you still found users in table then delete them.

select * from DYNAMICS..SY00800 where USERID in(‘XXXX’,’ XXXX ‘,’ XXXX ‘,’ XXXX ‘)

select * from DYNAMICS..SY00801 where USERID in(‘ XXXX ‘,’ XXXX ‘,’ XXXX ‘,’ XXXX ‘)

  • delete from DYNAMICS..SY00800 where USERID=’ XXXX ‘
  • or if more than one users then delete from DYNAMICS..SY00800 where USERID in (‘ XXXX ‘,’ XXXX ‘,’ XXXX ‘,’ XXXX ‘)

Now update the batch status.

  • update  sy00500 set  BCHSTTUS=0 where  BCHSTTUS=3 and BCHSOURC=’GL_Normal’  and  userid in (‘ XXXX ‘,’ XXXX ‘,’ XXXX ‘,’ XXXX ‘)

Verification:

now your query “select BCHSTTUS,USERID,* from sy00500 where BCHSTTUS=3 and BCHSOURC=’GL_Normal’” should not return anything.

Filed under: Dynamics GP, dynamics-gp, Posting Issues,

This Favorite contains a column from a product (3180) not installed on this workstation. The following columns will not be displayed: Node

Image

The issue was coming after removal of product Analytical Accounting 3180. This popup message appears only in the Account Lookup, once after selecting OK it wouldn’t appear for the Login user until the re-login.

After confirming that GP security is set to use SmartList for Account Maintenance Lookup window the first thing I did to record the macro to make sure what dictionary system is trying to read.

Below is what I got.

# DEXVERSION=11.00.0352.000 2 2

CheckActiveWin dictionary ‘SmartList’  form ‘ASI_Advanced_Search’ window ‘ASI_Explorer_Criteria’

MoveTo field ‘ASI_Search_Lookup_Button'[1]

ClickHit field ‘ASI_Search_Lookup_Button'[1]

NewActiveWin dictionary ‘SmartList’  form ‘ASI_Explorer_Fields’ window ‘ASI_Explorer_Fields’

MoveTo field ‘(L) LV_Fields’ item 0  # ”

ClickHitMS field ‘(L) LV_Fields’ item 23  # ‘aaNode’

SelChanged field ‘(L) LV_Fields’

After reading macro,

1. it is confirmed that application is not trying to read uninstalled product  3180.

2. Dictionary giving message is of SmartList ( so checked the smartlist tables)

3.Issue is with field named ‘aaNode’

Once the Node field issue got resolved,I got the same error message for several other fields, I have deleted records from back end from below two tables. And yes before deleting records I took table backup.

Dynamics..ASIEXP86
Dynamics..ASITAB20

There are two columns in these tables ASI_Field_Name and ASI_Column_Display_Name.My field display name is Node and other name is aaNode, check the field id with the name of it.

—-delete from  ASIEXP86 where ASI_Field_Number_Dict_ID=3180

—-and ASI_Favorite_Dict_ID=0

—-delete from ASITAB20 where ASI_Field_Number_Dict_ID=3180

—-and ASI_Favorite_Dict_ID=0

After deleting particular records from tables, issue got resolved and there were no pop up message.

Filed under: Analytical Accounting, Dexterity Development, , , ,

Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Enter your email address to follow this blog and receive notifications of new posts by email.

almas

Error: Please make sure the Twitter account is public.

Blog Stats

  • 7,879 hits

RSS dynamics-gp

  • VSTools and database triggers.
    In SanScript coding we have database triggers, Below is a detail of what database triggers are as explained in dexterity manuals. Database triggers Database triggers are activated by successful table operations, such as a record begin read, saved, or deleted. The procedure that runs in response to a database trigger has access to the same […]
    Almas
  • Getting the current active window in Dexterity.
    Using dexterity there is not a direct way of getting current active window information, but with set of available GP functions and triggers can make this task happen. Below I am sharing a trigger and function which can tell the active window name. Below code needs to be changed according to the needs of developer, […]
    Almas
  • Hints and Tips… On going Post
    This is on going post and points will be added from time to time. 🙂 .. with Field Level Security we can not restrict document access on Sales transaction entry Window. Means we can not make user to choose only ‘Invoices’ in SOP Type drop down. .. we can not add custom table in table […]
    Almas
  • Reversing the sort order of Receivable Transaction Inquiry – Customer by Document Date
    Last few months we got more request on changing sort orders of Inquiry windows and lookups and to cover them all in a one place I have been working on a small project which will provide a simple sorting without much effort. In Dynamics Community there was a post having similar situation, I have already […]
    Almas
  • Getting the current open window in .net GP Add In
    There are many ways of getting information of active window in GP, but it changes according to the developing tool we are working on. 1.Dexterity.(the best tool 🙂
    Almas
  • Not all RW_Function are meant for reports.
    There are lots of RW functions available in a report writer Calculated Field Definition window and almost all of them are so handy while working on report writer, but it is a matter of fact that some of them are not actually meant for report writer. Usually RW functions are associated with report writer and […]
    Almas
  • Dexterity Can Wait and Respond.
    https://evspakistan.wordpress.com/microsoft-dexterity-can-wait-respond/Filed under: Can i, Dexterity Development, Dynamics GP, dynamics-gp, Uncategorized Tagged: Delay, dexterity, Wait
    Almas
  • Cross Dictionary Development.
    https://evspakistan.wordpress.com/cross-dictionary-development/    Filed under: Dexterity Development, Dexterity Triggers, Dynamics GP, dynamics-gp, Uncategorized
    Almas
  • Calling Sales Document Numbers Lookup
    Often developers need to open available lookup on their custom form from dynamics GP.Sales Document Number lookup is a very common and much used lookup and every dynamics technical person needs to call it in once (or more) in their lifetime. 🙂 Dynamics GP SDK provide a prototype of coding on how to open various […]
    Almas
  • This datatype name is already in use.
    This datatype name is already in use.
    Almas
Coding Notes

Code, News, Tech & Stuff

Dynamics GP Builders & Reporting

How to use MS Dynamics SmartList Builder, Excel Report Builder and other Reporting tools to get the data and analysis you need.

%d bloggers like this: