How to set the style to 'default' (Not ReadOnly) in Kinetic Application Studio

In C sharp, we had Row Rules where you could simply set the Style to ‘default’. It would then allow the field to be editable

In Kinetic, the only options are: SettingStyle:Disable, SettingStyle:ReadOnly and another option to DisableRow Except these Columns. That last option doesn’t work for what I’m trying to do

Is there any way to either execute custom code to enable the field or do it in a row rule or whatever? I’m only trying to enable the AssemblySeq and MtlSeq in the Misc Shipment Entry because for some reason, even if you enter a job, they are ReadOnly. It worked great to enable it before

image

Thanks

This gets a bit hairy depending on how the native screen is configured.
There’s no real way to use custom code in app studio. Custom code is done server-side now via functions (as it should be), so there’s a separation between server and client which means there’s no way to affect the properties through functions/code.

Where I would start if I were you would be to go through the native rules and find which one is disabling it. Usually, the way they disable fields is based off of some variable in TransView, SysVariables or otherwise. Knowing that, sometimes you can create an event that sets that “TransView.ReadOnly” field back to false to unlock the field. Doesn’t always work, though.

The fields could also be marked as read only/disabled on the property as well.
If that’s the case, you may be able to uncheck it.
You may also be able to create an event that uses the property-set widget to check/uncheck it.

This is one of those where you’ll have to experiment and beat your head against your keyboard for a bit because it’s not straight forward.

2 Likes

I found that I can switch the ‘ServiceJob’ field to true but unfortunately, it only enable the MtlSeq field. Not sure what’s going on with AssemblySeq :frowning:

If only there was a way to search what row rules are affecting a column. The only way really is to click one by one? There’s like 50 + row rules in that screen alone

Guess I’ll have to look into it but that’s one thing that’s not simpler at all

Are you SaaS?

If not, you can go to the MetaUI folder on the server and look through the JSON. Bit easier to CTRL+F that way.

If you’re SaaS, make a query and look at the XXXDef.Content where TypeCode = “KNTCMetaUI” And Key2 LIKE “%Rules%”

1 Like

Went into this path and it worked really great : Server\Apps\MetaUI\Erp.UI.MiscShipEntry

I guess something went wrong with the converted customization from Classic to Kinetic because I started from Scratch and simply setting the ServiceJob flag to true enables both the AssemblySeq and MtlSeq which is perfect for me

Thanks for helping, really helped me understand what should be possible to do something like this!

I see these two:

    {
      "id": "ruleServiceJob",
      "dataView": "MscShpDt",
      "condition": "ServiceJob = false",
      "actions": [
        {
          "action": "DisableColumns",
          "columns": [
            "MtlSeq",
            "AssemblySeq"
          ]
        }
      ],
      "customizable": false,
      "disabled": false
    }
    {
      "id": "closedLineRule",
      "dataView": "MscShpDt",
      "condition": "ShipStatus = 'CLOSED'",
      "actions": [
        {
          "action": "DisableColumns",
          "columns": [
            "PartNum",
            "LineDesc",
            "XPartNum",
            "XRevisionNum",
            "Quantity",
            "IUM",
            "AssemblySeq",
            "MtlSeq",
            "JobNum",
            "CallNum",
            "CallLine",
            "DMRNum",
            "CustNumCustID",
            "BtnPartDesc",
            "DispNumberOfPieces"
          ]
        }
      ],
      "customizable": false,
      "disabled": false
    }