Modifying a Dexterity Form

This question is not answered

I am new to this so any help would be appreciated.

I have a third-party dictionary which contains (among other things) a
modified Purchase Order Acknowledgement (System form). I am trying to modify
the Dexterity script and deploy it.

I have tried to make a modification on the third-party dictionary and
Autochunk but I got “No forms dictionary to update No reports dictionary to
update” in the installerrors.txt when I drop the chunk file. I should also
mention the third-party dic has a product id of 1239.

Wen I open the third-party dictionary, it has the usual "string missing" but
I can't combine since the product id is less than 22000.

Thank you in advance.

All Replies
  • Are you trying to customize a 3rd party form? You should be aware of the limits of this method, and it will be more practical to use an alternate approach, such as using VBA/continuum, or cross-dictionary scripts.

  • Since you are new, I guess these rules apply:

    1) Do not attempt to modify, remove, or overwrite any scripts on any Dynamics GP or third-party window. That's what Dexterity triggers are for.

    2) Autochunk will not work because you are modifying resources with an ID below 22000, therefore you must move these manually to your extracted dictionary before chunking. The alternative is to create a macro that will extract and chunk the modified objects for you.

     

    Best regards,

    MG.-
    Mariano Gomez, MIS, MVP, MCP, PMP
    IntellPartners, LLC
    Blog: http://dynamicsgpblogster.blogspot.com

  • Ruel,

    If a Consultant takes the Purchase Order Acknowledgement form, modifies it and puts it in a new dictionary, is that a 3rd party form?

  • Mariano,

    1) In other words,So the previous Consultant already created an "alternative" version of the PO Ack form and placed it in a new dictionary, I should not modify this new dictionary and use triggers instead? Is this best practise or is it the only way technically?

     2)How would I manually moved them. Use the Developer Update? If you can give me some steps that would be great. I am using Dexterity Util 10.

     

    Thanks for your help so far.

  • No,

    In other words, if you are forced to modify an existing GP form, try not to overwrite any existing scripts -- the ones that appear with "(No Source)" when you open the window or fields scripts. Technically speaking, I suggest you use "Companion Windows" instead of attempting to modify an existing window.

    Best regards,

    MG.-
    Mariano Gomez, MIS, MVP, MCP, PMP
    IntellPartners, LLC
    Blog: http://dynamicsgpblogster.blogspot.com

  • So I am playing around with "Trigger_RegisterFocusByName" to add more logic after a click of a button on that form. My problem right now is accessing the fields on the forms. How do I get the values off of the form?

  • What do you mean? Just reference the object!

    someVariable = SomeField of SomeWindow of SomeForm;

    or;

    someTableColumn of SomeTable = SomeField of SomeWindow of SomeForm;

    That's standard Dexterity programming.

    Best regards,

    MG.-
    Mariano Gomez, MIS, MVP, MCP, PMP
    IntellPartners, LLC
    Blog: http://dynamicsgpblogster.blogspot.com

  • I understand but I tried to add a "warning" message of just "test" two ways with no luck, if:

    1) I create my script in the Dynamics.dic file , I can't compile my code since the form I want to attach to is in an another dictionary. I was able to to deploy and get the hardcoded "test" message to come up after I click the button.

    2)and if I create my script in the third-party dictionary, and go through the extract/autochunk, the chunk file seems to install but the "test" message doesn't come up. One thing to note that this thirdparty file has a lot of those "no source" message. Should I combine with dynamics.dic first?

     I appreciate your help and patiance, I know I am asking a lot of rookie stupid questions.

     Thanks.

  • Q, you were onto it about 3 posts up. In conjunction with cross-dictionary triggers, you can get values from the other dictionary at runtime by calling the execute() command. If you checked the link I gave you, there is a download link to sample scripts, I am putting the link here for your convenience:

     http://blogs.msdn.com/developingfordynamicsgp/attachment/8768896.ashx

    Check out the section on "Cross Dictionary Helper Functions", and the GetWindowValue function specifically.

    That should be one way to do it. 

    I hope this helps.

  • I did download that, I am testing the GetWindowValue function right now. I will let you know how that goes.

     Thanks again

  • Hi Q

    Changing a form layout 

    When it comes to modifying an existing form with Dexterity, you can ONLY modify a form that exists in the Dynamics.dic.  This is then transferred to the extracted dictionary to become an alternate form during the chunking process.

    If you want to modify a form that exists in any other dictionary, be it an original 3rd party form or an alternate of a Dynamic.dic form, you can only use the Modifier.

    Use Triggers to code changes 

    If the form exists in the Dynamics.dic you can use standard triggers. Standard triggers will work against an alternate or modified version of a form as long as all the fields referenced are still available on the non original version.

    If this is an original 3rd party form or you wish to trigger against fields in the alternate window and not in the original window, then you need to use cross dictionary triggers in the context of the 3rd party dictionary.

    In your trigger handling scripts need to reference fields that do not exist in the Dynamics.dic they will need to use pass through Dexterity sanScript with the execute() function in the context of the 3rd party dictionary.

    I will post more information on my blog on Friday.

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

     

     

  • Alright, a syntax question. Here is what I got 

    local anonymous appl_number;
    local integer result;
    local integer datatype;

    result = GetWindowValue(1239, "XXX", "XXX", "'(L) File_Name'", appl_number, datatype);
    warning string(result);

    But I get a message of "0" instead of the file path in that field. Am I missing something? when I look at the getwindowvalue function, I dont see how it is returning the field's value, it looks like it is returning the error_count. help?

  • Hi Q

    I am assuming you are using the GetWindowValue code from the Pushing the Limits with Dexterity conference materials.

    Result equalling zero is great, it means that there were no errors obtaining the value.

    The result should be returned into the variable you have called appl_number.  As '(L) File_Name' is a string field you can pass in a string variable for the result to be placed into.  The parameter needs to be anonymous but the variables passed should match the datatype of the field you are getting.

    Retrieving the datatype number is optional and probably not required for your code.

    Hope this helps.

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

  • local anonymous appl_number;
    local integer result;
    local integer datatype;

    result = GetWindowValue(1239, "XXX", "XXX", "'(L) File_Name'", appl_number, datatype);

    if err = OKAY then
       warning string(appl_number);

    end if;

     

    Best regards,

    MG.-
    Mariano Gomez, MIS, MVP, MCP, PMP
    IntellPartners, LLC
    Blog: http://dynamicsgpblogster.blogspot.com

  • Mariano, just nitpicking, shouldn't the if block read:

    ...

    if result=0 then

    ...

    end if;

    ...

     

     (??)