Scripting

  • 1.  UI Scripting (v2015). The customer wants to have

    Posted 03-03-2017 15:14
    UI Scripting (v2015). The customer wants to have something really stand out visually for some items in item maintenance / inquiry, and I was thinking I could perhaps use something like this (but it doesn't work on either a UI script event, or table post-read trigger): `MASUI = CBool(oScript.UIObj) If (MASUI) Then Set myUIObj = oSession.AsObject(oScript.UIObj) myUIObj.SetControlProperty ""ITEMCODEDESC"",""BackColour"",""RED"" Set myUIObj = Nothing End If` I'm told the users basically ignore pop-ups, so that's not an option. Any ideas on how I might programmatically change the colour of a panel object? I've done it in GD_LINES, but don't know how to get it to work for a normal field / button / object.


  • 2.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 06:30
    I'd also like to know if that's possible.


  • 3.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 07:40
    You could also do this in Custom Office without using scripting.


  • 4.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 07:45
    I found a note in the sample script's from Alnoor's class... I was missing a ""$""... this works: `If (oScript.UIObj) Then Set myUIObj = oSession.AsObject(oScript.UIObj) myUIObj.SetControlProperty ""ITEMCODEDESC"",""BackColour$"",""RED"" Set myUIObj = Nothing End If` @DeniseSawyer how would I apply business logic to a panel change without a script? (The customer wants only certain items to have the different colour).


  • 5.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 11:56
    Very interesting... just because I am curious, how are you determining which items to apply this to? Another UDF field? Product Line? Hard coded list of items?


  • 6.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 12:26
    They have a PriceCode for items with controlled pricing, so they want sales reps to be aware they are viewing such an item, to not give a verbal discount when talking with a customer. (This is on top of a script for SO entry to block pricing overrides for those items, unless the user has a specific role).


  • 7.  RE: UI Scripting (v2015). The customer wants to have

    Posted 03-06-2017 13:33
    Kevin, I misunderstood your need. You are correct. It would have to be completed in a script.