Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

GP 2013- Area page not getting displayed ?

Posted on by 1,240

Dear Madam / Sir,

I have merged existing Dynamics.dic of GP2010 to GP2013's dynamics.dic by dexterity utilities 12.0. After chunk creation when I tested GP2013, I got an issue that Area Pages were not getting displayed which were properly getting displayed in GP2010. I had gone through Integration guide of GP2013 and came to know that syntax have been changed. I changed the code to load area page, recreated chunk and rechecked but still it couldnt' resolve the issue. I am herewith pasting the code to load areapage. Please let me know if there is any other specific reason behing it.

 

local CommandTag PageTag;
local AreaPageXMLState XMLState;
local boolean result;
local integer ParentCmdTag,ParentDictID,ParentFormID,ParentCmdID;

{Runtime_GetCurrentProductID()}

Command_GetIDs(Command_GetTag(command CL_Formula_Cards of form Command_BMM),ParentDictID,ParentFormID,ParentCmdID);

{Get the tag for the page}
PageTag = Command_GetTag(ParentDictID, ParentFormID, ParentCmdID);
call Command_HideAndDisable, command CustomizeHomePage of form Command_System;
{Add items to the Area page}
call Create of form syAreaPageXML, XMLState, "Formulation";
{Add items if needed}
if not empty(XMLState:XMLDoc) then
{Cards}
if SectionWillDisplay(PageTag, Command_GetTag(command CL_Formula_Cards of form Command_BMM),
SECTIONTYPE_APCARDS of form syContentPageObj,
getmsg(9823) {Cards}, 1) of form syAreaPageObj then
call AddContentArea of form syAreaPageXML, XMLState,  getmsg(9823) {Cards}, IMAGE_CARDS of form syAreaPageXML,
  true, 1;
call AddCommand of form syAreaPageXML, XMLState, command
  CL_Formula_Cards of form Command_BMM;
result = AddSectionXML(PageTag, Command_GetTag(command CL_Formula_Cards of
 form Command_BMM), XMLState) of form syAreaPageObj;
end if;
end if;

I shall be profusely thankful for your help.

Thanks and Regards -

Jitendra Verma

jitverma@yahoo.com

 

 

 

*This post is locked for comments

  • Jitendra Verma Profile Picture
    Jitendra Verma 1,240 on at
    Re: GP 2013- Area page not getting displayed ?

    tnkx steve..

    please let me know how can I debug in dexterity, I tried earlier but couldnt come to know. I had even downloaded program debugging tool but couldn't debug. In order to resolve ths aforesaid issue, I had to make changes in dexterity then create the chunk and login in GP each time to check the effect. Is it any convenient way to handle it?

  • Steve Kubis Profile Picture
    Steve Kubis on at
    Re: GP 2013- Area page not getting displayed ?

    I think you're going to have to step through the code with the debugger to help you track down the issue. You didn't include the code that creates the sections that don't display, so I can't see if there's anything there that looks incorrect.

    If you can't use the debugger, then I think your next best solution to debug is to add the sections of the area page one at a time, until you find the one that causes the error.

    Steve

  • Jitendra Verma Profile Picture
    Jitendra Verma 1,240 on at
    Re: GP 2013- Area page not getting displayed ?

    meanwhile, I had done following changes in trigger processing procedure...

    local string display_name;

    PageTag = Command_GetTag(dictID, formID, commandID);

    display_name = Command_GetStringProperty(PageTag, COMMAND_PROP_DISPLAY_NAME);

    i changes my if condition to this way ....

    if dictID = Runtime_GetCurrentProductID() and  upper(trim(display_name)) = "PRODUCTION" then ....

    when i checked it threw me error....

    Value cannot be null.

    parameter name: content value

    I am not really getting that with three area pages it is working properly atleast without any error but with a single one, it is showing this error in messagebox. After pressing ok button of messagebox, it displays only cards and reports section and do not display utilities and setup section.

    To verify the issue, I commented code written for rest area pages and tried only with single page but it is still showing same error.

    I even seachred for "parameter name: content value" in dynamics.dic but couldn't find anything related.

  • Verified answer
    Steve Kubis Profile Picture
    Steve Kubis on at
    Re: GP 2013- Area page not getting displayed ?

    Now I understand that you have 3 separate area pages. That's likely what's causing the issue. In your trigger processing procedure, you need to

    distinguish between the 3 different area pages. You have a check in the trigger processing procedure to verify the dictionary, but you also need a

    check to verify which area page is being displayed. To do that, you'll need to examine the CommandID parameter.

    Below, I've added a comment to show where you'd need to add this check. This will prevent all 3 trigger processing procedures from running when the

    user clicks the link for your area page. Only the area page that the user chose will be built.

    If you add this check, then I think your area pages will work correctly.

    Steve

     

    in integer dictID;  
    in integer formID;  
    in integer commandID;  
      
    local CommandTag PageTag;  
    local AreaPageXMLState XMLState;  
    local boolean result;  
      
    {If it is our product, then create the area page content.}  
      
    if dictID = Runtime_GetCurrentProductID() then  
     {Get the tag for the page} 

    { -- Here's where you need to add another "if" statement to check the commandID. If the commandID matches the command for the list, then you can allow

    the page to be built. Otherwise, you should let the code fall out of the procedure without performing any action. -- }

     PageTag = Command_GetTag(dictID, formID, commandID); 
      

  • Jitendra Verma Profile Picture
    Jitendra Verma 1,240 on at
    Re: GP 2013- Area page not getting displayed ?

    tnkx steve...

    In an attempt to resolve the specific issue, when i tried to display single page , it threw error in a messagebox-

    Value cannot be null.

    parameter name: content value

    whereas if i trying to display three area pages together, it is displaying all data correctly in a single area page as mentioned earlier.

    why this message "Value cannot be null." is coming? which value it is looking for..

    I am herewith providing you the piece of code.

    defined area page type as 'Content page' of 'command_NavBar'
     
    - On command pre script , placed following piece of code (for each area page)-
     
    result = ContentPageCommand_SetType(Command_GetTag(command
     AreaPage_Formulation), CONTENTPAGE_TYPE_AREAPAGE) of form syContentPageObj;
     
    result = ContentPageCommand_SetType(Command_GetTag(command
     AreaPage_BOM), CONTENTPAGE_TYPE_AREAPAGE) of form syContentPageObj;

    result = ContentPageCommand_SetType(Command_GetTag(command
     AreaPage_Production), CONTENTPAGE_TYPE_AREAPAGE) of form syContentPageObj;
     
    - created a new script IG_TRG_AreaPage_Formulation and placed following piece of code -
     
    in integer dictID;  
    in integer formID;  
    in integer commandID;  
      
    local CommandTag PageTag;  
    local AreaPageXMLState XMLState;  
    local boolean result;  
      
    {If it is our product, then create the area page content.}  
      
    if dictID = Runtime_GetCurrentProductID() then  
     {Get the tag for the page} 
     PageTag = Command_GetTag(dictID, formID, commandID); 
      
     call Command_HideAndDisable, command CustomizeHomePage of form 
     Command_System; 
      
     {Add items to the Area page} 
     call Create of form syAreaPageXML, XMLState, "Formulation"; 
      
     {Add items if needed} 
     if not empty(XMLState:XMLDoc) then 
      {Cards}
      if SectionWillDisplay(PageTag, Command_GetTag(command CL_Formula_Cards  of
       form Command_BMM),
       SECTIONTYPE_APCARDS of form syContentPageObj,
       getmsg(9823) {Cards}, 1) of form syAreaPageObj then
      
       call AddContentArea of form syAreaPageXML, XMLState,
       getmsg(9823) {Cards}, IMAGE_CARDS of form syAreaPageXML,
       true, 1;
     
       call AddItems of form syAreaPageXML, XMLState, command
       CL_Formula_Cards of form Command_BMM;
      
       result = AddSectionXML(PageTag, Command_GetTag(command CL_Formula_Cards
       of form Command_BMM), XMLState) of form syAreaPageObj;
      end if;
     
    added similar code for report and utilities section.
     
    - create two other scripts for two other area pages IG_TRG_AreaPage_BOM ,IG_TRG_AreaPage_Production .
    - Finally on start up script, added following piece of code-
     
    l_result = Trigger_RegisterProcedure(script TRIGGER_CreateAreaPageContent of
      form Command_NavBar, TRIGGER_AFTER_ORIGINAL, script
      IG_TRG_AreaPage_Formulation);
    if l_result <> SY_NOERR then
    warning "Trigger registration for CreateAreaPageContent failed.";
    end if;

    l_result = Trigger_RegisterProcedure(script TRIGGER_CreateAreaPageContent of
      form Command_NavBar, TRIGGER_AFTER_ORIGINAL, script
      IG_TRG_AreaPage_BOM);
    if l_result <> SY_NOERR then
    warning "Trigger registration for CreateAreaPageContent failed.";
    end if;

    l_result = Trigger_RegisterProcedure(script TRIGGER_CreateAreaPageContent of
      form Command_NavBar, TRIGGER_AFTER_ORIGINAL, script
      IG_TRG_AreaPage_Production);
    if l_result <> SY_NOERR then
    warning "Trigger registration for CreateAreaPageContent failed.";
    end if;

  • Steve Kubis Profile Picture
    Steve Kubis on at
    Re: GP 2013- Area page not getting displayed ?

    What you show so far seems correct, and if I understand correctly, you're seeing your area page now.

    If the page content doesn't contain sections, then there is a problem with the trigger processing procedure that creates the area page content. The code in this procedure has changed from GP 2010, so you'll have to make revisions to it to allow it to work in GP 2013.

    How does your code in your trigger processing procedure compare with the sample show in the GP Integration Guide? You didn't include your code here, so I can't do any comparison myself.

    Steve

  • Jitendra Verma Profile Picture
    Jitendra Verma 1,240 on at
    Re: GP 2013- Area page not getting displayed ?

    Tnkx for the response.

    That's right. Process of creating area page is different here. I had followed the steps as mentioned in IG. I have created three area pages. Now, the issue i am facing is that data of all the area pages (including cards, reports, setup) is getting displayed on a single area page. If I click any of the menu , it displays all data in a single area page.

    steps used by me -

    1) on command pre script, qry has been applied -

    result = ContentPageCommand_SetType(Command_GetTag(command

    AreaPage_Formulation), CONTENTPAGE_TYPE_AREAPAGE) of form syContentPageObj;

    2) New procedure has been written to populate the area page as mentioned in IG.

    3) on start up, below piece of code is placed to register -

    l_result = Trigger_RegisterProcedure(script TRIGGER_CreateAreaPageContent of

     form Command_NavBar, TRIGGER_AFTER_ORIGINAL, script

     IG_TRG_AreaPage_Formulation);

    if l_result <> SY_NOERR then

    warning "Trigger registration for CreateAreaPageContent failed.";

    end if;

    what should i do to display page specific data?

  • Steve Kubis Profile Picture
    Steve Kubis on at
    Re: GP 2013- Area page not getting displayed ?

    The process of creating an area page is significantly different for GP 2013. You'll need to make additional changes beyond just code.

    Open the IG.chm file included with the Dexterity installation and view the "What's new" section. You'll see an entry for Area Pages. This lists the high-level changes you need to make, and provides a link to the sections that describe the changes in detail.

    Here's a summary of the changes you need to make to Area Pages to get them to work correctly in GP 2013:

    Area Pages

    The implementation of Area Pages has changed. If you have implemented your own Area Page in a previous version of Microsoft Dynamics GP, you must update your Area Page so that it works correctly. You must do the following:

    - Revise the command used to open the Area Page.

    - Add code to set the page type property for the Area Page command.

    - Register a procedure trigger to create the Area Page content.

    - Add a trigger processing procedure that creates the content of the Area Page. The code in this procedure is a revised version of the code from the command that had been used to open the Area Page.

    Hope this helps.

    Steve

  • Jitendra Verma Profile Picture
    Jitendra Verma 1,240 on at
    Re: GP 2013- Area page not getting displayed ?

    I need sample code in dexterity 12.0 with GP2013 to create area page..

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans