×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Row rule or Similar

Row rule or Similar

Row rule or Similar

(OP)
Hello,

We added a new sheet to the Part screen called 'Design' with some fields, two of which are Part.CheckBox10 and Part.NetWeight.  We now want to put a rule in place to state: When Part.Check10 = True, Then Part.NetWeight is disabled, else Part.NetWeight is enabled. I first attempted via the Row Rules but then noticed the newly created Design does not appear under views. I then attempted via the script editor using the following code from the rule:

Private Sub CreateRowRuleGlbPartCheckBox10Equals_TrUE

Dim disabledGlbPart_NetWeight As RuleAction = RuleAction.AddControlSettings(oTrans, "GlbPart.NetWeight", SettingStyle.Disabled)

Dim ruleActions As RuleAction() = new RuleAction() {disabledGlbPart_NetWeight}

Dim rrGlbPartCheckBox10Equals_TrUE As RowRule = New RowRule("CheckBox10", RuleCondition.Equals, True, ruleActions)


CType(oTrans.EpiDataViews("Design"), EpiDataView).AddRowRule(rrGlbPartCheckBox10Equals_TrUE)


End Sub

However, I then recevie the following error:

Error Detail
============
Exception has been thrown by the target of an invocation.


Stack Trace
===========
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Epicor.Mfg.UI.Customization.CustomScriptManager.initCustomAssembly(Assembly assm)

Inner Exception
===============
Object reference not set to an instance of an object.

Inner Stack Trace
=================
at Script.CreateRowRulePartCheckBox10Equals_TrUE()
at Script.InitializeCustomCode()

Any ideas?

Regards,

Michael

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close