Skip to main content
avillanueva
23-Emerald I
23-Emerald I
July 2, 2021
Solved

Issue with Business Rule and ERPConnector

  • July 2, 2021
  • 1 reply
  • 3357 views

First time using this. Short summary, looking to block "Design" view BOMs from being sent to ERP Connector (SAP). I am using preference "Business Rule set to inhibit production BOM publishing" and I have loaded a custom Attribute business rule. I have also set my DT value for "Always publish Production BOM..." to no. Sry I cannot post text of Business Rule but here it is:

avillanueva_0-1625259824410.png

Simple rule that should be true if view=Design. Except that I am still getting Design View BOM Headers in my export when the Change Notice is released. Do I have the right attribute for "view"? I often wonder where the source of the exact names is so I can look them up? I've seen it in the ESIResponseMetaInfo.xml as "view.identity" so I could be wrong there. Is the value right? I know that Design in DB is actually 1445. How can you test a business rule to know if its working? I did not see that in the documentation. Any logs that can be turned on to show it being evaluated? Thanks in advance for any replies.

 

As an aside, what's up with the business rules and specifying an object id? Seems odd. Must I keep track of these numbers now so I do not duplicate them? hmmm...

 

Best answer by avillanueva

To paraphrase Rodney D - "I feed like I've given birth ... to a developer!"

Solved, it should not have been this hard.

Rule for Views is like this:

   <config name=view.identity" value="=Design"></config>

Had to use Logical Attribute Report (netmarkets/jsp/lwcType/logicalAttributeReport.jsp). Note that even though "viewName" is listed, would not import since Attribute Condition could not find what data type it was. 

And... it works: Here is the log:

avillanueva_0-1625596272201.png

So, to recap:

  • Distribution Target as "Always publish Production BOM" options set to "YES"
  • Preferences call out Business Rule to prohibit BOM publishing set to my business rule set
  • Now I can post both Design and Manufacturing views to CN Resulting Items and ONLY the Manufacturing BOM is published.

1 reply

18-Opal
July 2, 2021

Tony,

 

Where you have

<config name="view" value="=Design"></config>

is your value correct

should it be

value="Design"

rather than

value="=Design"

avillanueva
23-Emerald I
23-Emerald I
July 6, 2021

You get an error on import of the business rule with this: value="Design"

Help docs say that it should be "=Design" or it could be "EXACT(Design" 

Its also possible I have the wrong attribute name. 

18-Opal
July 6, 2021

Tony,

 

You probably know this but I'll mention it anyway.  WTParts have two attributes, view and view.id

view.id is a String

where as view is a TypeInstanceIdentifier

 

Maybe try using view.id rather then view.

 

Just a thought.