Set Color for Item Number in lookup

Last post 11-24-2008 9:52 PM by Lexter Tan. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 11-19-2008 2:16 PM

    Set Color for Item Number in lookup

    Hi,

    Is it possible to set a color scheme in the item number lookup window? e.g. every item number that display in every line have different font color. Thanks in advance.

     Lexter

  • 11-19-2008 4:59 PM In reply to

    Re: Set Color for Item Number in lookup

    Hi Lexter

    This is possible as a customisation.

    You would need to use Dexterity commands in the Field_ function library to change the font or background colours based on your business rules.

    It would be possible to use the unsupported method of calling Dexterity Sanscript from VBA to achieve the same thing.  This method is discussed in the materials from the Technical Airlift, see the post below:

    http://blogs.msdn.com/developingfordynamicsgp/archive/2008/07/11/microsoft-dynamics-gp-technical-airlift-2008.aspx 

    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. 

    Tags: ,
  • 11-20-2008 2:07 PM In reply to

    Re: Re: Set Color for Item Number in lookup

    Hi David,

    I created a trigger in the fill script in the scroll window of item lookup but it does not work. also I put a trigger in the post script of the scroll and it work fine but when i scroll down it reset all the colors to original. Any adivice with this one? thanks

     

    Lexter 

  • 11-20-2008 2:16 PM In reply to

    Re: Re: Re: Set Color for Item Number in lookup

    Hi Lexter

    I believe the triggers are needed after the LINE_FILL and LINE_PRE events.

    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. 

    Tags:
  • 11-20-2008 2:57 PM In reply to

    Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi David,

    Thanks for the quick response, but i tried that also but it does'nt work.  The problem is when the fill script triggers it just display original colour, i still need to use the arrow keys to move up or down so the color of each line will change. Any advice? thanks a lot.

     

    local boolean result;

    result = Field_SetFontColor('Item Number' of window IV_Item_Number_Scroll, COLOR_RED);

     

  • 11-20-2008 3:16 PM In reply to

    Re: Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi Lexter

    Are you making sure your code runs after the original scripts?

    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. 

  • 11-20-2008 4:01 PM In reply to

    Re: Re: Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi David,

    I am sure because i am logging the script and doing it in test mode. Thanks.

     

     Lexter

  • 11-21-2008 4:21 AM In reply to

    Re: Set Color for Item Number in lookup

    But what does the trigger registration in the Startup procedure say?

    TRIGGER_AFTER_ORIGINAL or TRIGGER_BEFORE_ORIGINAL

    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. 

     

  • 11-22-2008 1:16 AM In reply to

    Re: Re: Set Color for Item Number in lookup

    Hi David,

     i used the TRIGGER_AFTER_ORIGINAL. the problem is upon loading it is not populated with proper color and the color of the scrolling window for fonts is the one defaulted.

     

    Thanks!

    Lexter

  • 11-22-2008 2:48 AM In reply to

    Re: Re: Re: Set Color for Item Number in lookup

    Hi Lexter

    Please can you post the scripts you are using?

    Thanks

    David 

    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. 

  • 11-23-2008 2:02 PM In reply to

    Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi David

    li_result = Trigger_RegisterFocus(anonymous(window IV_Item_Number_Scroll of form IV_Item_Number_Lookup),
      TRIGGER_FOCUS_FILL, TRIGGER_AFTER_ORIGINAL, script Color_Trig_IV_Item_Number_Lookup_SCROLL_FILL);
    if li_result <> SY_NOERR then warning "Focus trigger for Color_Trig_IV_Item_Number_Lookup_SCROLL_FILL failed."; end if;

    li_result = Trigger_RegisterFocus(anonymous(window IV_Item_Number_Scroll of form IV_Item_Number_Lookup),
      TRIGGER_FOCUS_PRE, TRIGGER_AFTER_ORIGINAL, script Color_Trig_IV_Item_Number_Lookup_SCROLL_FILL);
    if li_result <> SY_NOERR then warning "Focus trigger for Color_Trig_IV_Item_Number_Lookup_SCROLL_FILL failed."; end if;
     

    local boolean result;

    default form to IV_Item_Number_Lookup;
    default window to IV_Item_Number_Scroll;

    if 'Item Number' of table IV_Item_MSTR = "-2001" or 'Item Number' of table IV_Item_MSTR = "-5414" then
     result = Field_SetFontColor('Item Number', COLOR_RED);
    else
     result = Field_SetFontColor('Item Number', COLOR_BLUE);
    end if;

  • 11-24-2008 2:08 PM In reply to

    Re: Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi Lexter

    This looks fine.

    I am not sure why it is not working for you properly.

    David

    PS: the warning for the second trigger needs to be update to say PRE

     

    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. 

  • 11-24-2008 9:52 PM In reply to

    Re: Re: Re: Re: Re: Re: Set Color for Item Number in lookup

    Hi David,

    No worries... thanks a lot!

     

    Regards,

    Lexter

Page 1 of 1 (13 items)