set focus on a specific field in navision 2013

hery_halimhery_halim Member Posts: 53
edited 2014-12-15 in NAV Three Tier
hello guys,

i know this has been pretty much discus in several forums. But i haven't found any good answer.

how do we set a focus on a specific field in page (navision 2013) ?

i believed we can use field.activate in nav 2009 classic.

but how do we get the same thing in rtc navision 2013?

any help, is really appreciated

Comments

  • hery_halimhery_halim Member Posts: 53
    hi mohana,

    Yes, i have tried it. And it gives me the error below.

    "Could no locate....."

    from what i read in forum, i don't think we can use the nav 2009 add ins without recompiling.

    viewtopic.php?t=53326
    http://scimanyd.blogspot.it/2012/10/nav ... addin.html

    Any suggestion ?
  • mohana_cse06mohana_cse06 Member Posts: 5,503
    It can be used..it is confirmed by Microsoft employee only in on of the your links..

    as in second link make sure you have

    1.That your add-in is registered in the client Add-in table
    2.That the PublicKeyToken matches

    You need to add the dll files under RTC/Ass-in folders
  • hery_halimhery_halim Member Posts: 53
    Hi Mohana,

    i follow below steps.

    INSTALLATION

    1) Copy "Ahead.Nav.Extensibility.dll" in "C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins" --> change it to \70\Role tailored Client\Add-ins

    2) Open classic client, object browser, table 2000000069 "Client Add-in"
    3) Add a new record
    Name: Ahead_EXFocus
    Token: 41567e7a458383d3
    Description: Ahead.Nav.Extensibility Focus


    USAGE
    On your page simply define a Text50 variable and add a new field referring to it. Open field properties and
    change "ControlAddIn" property to "Ahead_EXFocus;PublicKeyToken=41567e7a458383d3". Caption of this field is
    not important; the controls will not take any space in the page.

    double check that i have registered it in the table table 2000000069.

    Still it said "could not locate the add-in library for "Ahead_EX.."

    any suggestion ?
  • mohana_cse06mohana_cse06 Member Posts: 5,503
    I hope you are placing the dll in Server.

    You need to place in Server/Add-in folder also..
  • hery_halimhery_halim Member Posts: 53
    hi mohana,

    i put the .dll also in

    C:\Program Files\Microsoft Dynamics NAV\70\Service\Add-ins\Focus

    but it still generates the same error.

    may be i miss something ?

    Thanks
  • chrisdfchrisdf Member Posts: 82
    Hi,

    I'm not sure if you sorted this or not but I've been caught out lately (twice - hopefully not ay more!) by copying a dll into the Add-In folder on my Windows 8 PC. I got the same error you have been getting.

    Found the problem by checking the properties of the dll on the General tab. My security level in Windows 8 causes the OS to put a block on the dll if it has originated from another computer. Clicking on the "unblock" option cleared it and allowed me to see the dll in the Add-In.
  • hery_halimhery_halim Member Posts: 53
    Hi chris,

    It's been a while. Unfortunately i am still stuck with this add-ins. Do you manage to use this add ins in navision 2013 ?

    I manage to add the addins. But whenever i open the page, it become not responding. So i thought this add ins is not compatible with navision 2013.

    The error in event viewer is as below :

    Type: System.TypeLoadException
    Message: Could not load type 'Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessQuadroTextControl' from assembly 'Microsoft.Dynamics.Framework.UI.WinForms.Controls, Version=1.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    StackTrace:
    at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.<>c__DisplayClass6.<DoRethrowWithCatchException>b__4()
    at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)
    at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(Func`1 execute)
    at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(Exception exception, Boolean designMode)
    Source: Microsoft.Dynamics.Nav.Client.WinClient
    HResult: -2146233054
    Type: System.TypeLoadException
    Message: Could not load type 'Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessQuadroTextControl' from assembly 'Microsoft.Dynamics.Framework.UI.WinForms.Controls, Version=1.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    TypeName: Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessQuadroTextControl
    StackTrace:
    at Ahead.Nav.Extensibility.Focus.set_Value(String value)
    at Microsoft.Dynamics.Framework.UI.WinForms.ControlAddInAdapter.OnUpdateValue()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.UpdateValue()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
    at Microsoft.Dynamics.Framework.UI.WinForms.ExpanderGroupControlAdapter.BuildChildren()
    at Microsoft.Dynamics.Framework.UI.WinForms.ExpanderGroupControlAdapter.OnUpdateState()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.UpdateState()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.UpdateState()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalFormAdapterBase.OnBeginBuildChildren()
    at Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
    at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl)
    at Microsoft.Dynamics.Framework.UI.WinForms.ClientSession.OnFormToShow(LogicalForm logicalFormToShow, LogicalControl originatingLogicalControl)
    at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.OnDialogToShow(DialogSessionEventArgs e)
    at Microsoft.Dynamics.Framework.UI.Windows.ClientSessionBase.DialogToShow(Object sender, DialogSessionEventArgs e)
    at Microsoft.Dynamics.Framework.UI.UISession.OnDialogToShow(DialogSessionEventArgs e)
    at Microsoft.Dynamics.Framework.UI.UISession.ShowDialog(LogicalForm logicalForm, LogicalForm owner)
    at Microsoft.Dynamics.Framework.UI.LogicalForm.<>c__DisplayClass9.<ShowDialogAndEnsureModality>b__8()
    Source: Ahead.Nav.Extensibility
    HResult: -2146233054
  • james_csjames_cs Member Posts: 39
    chrisdf wrote:
    Found the problem by checking the properties of the dll on the General tab. My security level in Windows 8 causes the OS to put a block on the dll if it has originated from another computer. Clicking on the "unblock" option cleared it and allowed me to see the dll in the Add-In.

    Hi Chris. Glad you're well. This was my problem so thanks for the pointer. I'd just like to add that I found that the Unblock button was not going out when I clicked it as it should have done according to this.

    http://msdn.microsoft.com/en-us/library/ee890038(VS.100).aspx

    I think it's because the file was in use and also in the program files when I tried to do it. I got around it by unblocking the original .zip file that I downloaded and re-copying the files into the program files.

    Thanks to MS for another Gotcha!
  • txerifftxeriff Member Posts: 492
    Hi all,

    Hope some1 can help.

    I have been trying with this tool, works fine if you want to change focus between fields but I´d like to keep focus on same field.

    it works this way basically:

    -user enters barcodes and sales lines are created
    -once he is done he posts the record

    when the user hits enter the control goes to the first field (marked in red). I have tried to add another field down there (see it in blue) but it doesnt work as you must validate() the field, pressing enter doesn´t make it work and go back to the barcode field (see it in green).

    Any ideas to keep the field focused?
    [-o<
    Sin_t_tulo.png
Sign In or Register to comment.