Buttons not displaying on DS form after migration to new server

 6 Replies
 1 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Greg C
Basic Member
Posts: 5
Basic Member

    We are migrating our Lawson instance to a new AIX server.  No application upgrade, environment upgrade from 10.0.4 to 10.0.9.  We tried to keep change to a minimum.  I've migrated the custom DS forms to the new server and they render, but I noticed that the custom buttons located on the right end "Action Bar" where Add, Change, etc. buttons are displayed are not showing.  In the current environment, the buttons display to the right of the drop-down action list.  

    I have run the Rebuild Forms Index successfully, cleared IOS Cache and verified that the source XML is identical between the systems and everything on the form renders except these custom buttons on the header action line.  Other custom buttons in the form itself do render.

    Has anyone experienced this issue before?  I tried the Set Custom Form Data Area (even though our DA didn't change) and it won't run because it gives an error that the DA can't be the same.  

     

    Thanks in advance for any light that can be shed here!

    -Greg

    Ragu Raghavan
    Veteran Member
    Posts: 476
    Veteran Member
      what if you moved the buttons to some other part of the screen? If they show up, that may tell you something.
      During one of the upgrades. I seem to recall warnings about the grid height/width. Needed to be changed to work correctly. I wonder if somehow your buttons fall outside the grid area.
      Greg C
      Basic Member
      Posts: 5
      Basic Member
        Hi Ragu,
        Thanks for the reply. I was wondering that and have been looking through the code. The buttons are not actually on the form. The are rendered dynamically I think. I am very new to DS and am just trying to get these to work in a new environment. The code that renders the buttons is below. I first opened the form in DS thinking I would move them, but when I couldn't find them I went searching in the form.xml.
        
        function FORM_OnAfterFrameworkInit()
        {
        parent.lawsonPortal.toolbar.createButton("Add Activity",AddActivity,"Add Activity");
        parent.lawsonPortal.toolbar.createButton("Change Estimate",ChangeEstimate,"Change Estimate");
        }
        
        Ragu Raghavan
        Veteran Member
        Posts: 476
        Veteran Member
          Yeah! The syntax may have changed with the upgrade. Syntax may also change if you go from one browser to another.

          I would just paint two buttons, label them as shown and call the functions AddActivity and ChangeEstimate. That is all that seems to be doing.
          Greg C
          Basic Member
          Posts: 5
          Basic Member

            I added the buttons to the form and am calling the correct functions, but the form is not processing as it should. I can see that it gets to the function because there is a display to the notification line at the bottom indicating the add function is in process. I can't tell where it's hanging.

            On a different note, I noticed that the NEW environment has a 'Print' button displaying on the form toolbar right where the buttons that are not displaying would be displayed. Do you know what controls that Print button displaying? All of the DS forms are showing this Print button on the toolbar in the new environment. I wonder if that is interfering with the display of the buttons from the createButton function?

            My next thought is to put alert displays in the code to see where the process is failing if possible. I'm such a noob with javascript and web development that I don't know how to run a debugger session in the script. I'm going to google and see what I can find. Perhaps if you know a link to a good article explaining that? All your input is much appreciated!! 

            I attached a screen shot of the toolbar showing the print button.

            Attachments
            Ragu Raghavan
            Veteran Member
            Posts: 476
            Veteran Member
              Yes, I have noticed that when the syntax is not right, the DS script just hangs.
              Not sure about the Print Button.
              Putting Alerts is certainly one way to troubleshoot.
              Using the F12 developer tools in IE or Chrome is another way. It has been a while since I did this. One way to do it is to add the statement "debugger;" just before the last statement in the script that you know works. Then you do the F12 and step through each statement after that t see where it freezes and see how the variables are set up.

              https://www.google.com/se...ubleshoot+javascript
              Greg C
              Basic Member
              Posts: 5
              Basic Member
                I want to say thanks again for the assistance, Ragu! I got some help today from a dev resource at Infor that my manager set up since we are so close to go live. Long story short, they changed how the toolbar is handled and that broke the code as you suspected. All I needed to do is remove the "parent.lawsonPortal." from those lines and voila, the buttons are showing again. They moved the toolbar to a higher scope/level. The working line is:
                  toolbar.createButton("Add Activity",AddActivity,"Add Activity"); 


                Thanks again!!
                - Greg