on 04-04-2014 10:36 AM
Hi,
I just noticed that the BOOperation Read in the UI Designer can use the NodeID, the KeyNavigation and the alternativeKey.
About the AlternativeKey I have no doubts... but what about the NodeID and the KeyNavigation? Can somebody explain me the differences between these keys?
Hi Alessandro,
this depends which key is available in the outport (i.e. when you want to connect an embedded component).
Example:
- AlternativeKey - Use it when you got the InternalID of the customer BO in the outport
- KeyNavigation - Use this if you have only the UUID of the customer BO in the outport
- NodeID - Use this if you have the NodeID of the customer BO in the outport
Usually I only use the first 2 options. There are some standard screens that do not offer the AlternativeKey but only the UUID in the outport, then you need to use KeyNavigation.
Btw: KeyNavigation requires a data structure with a data field in your data model. But it works similar then with Alternative Key.
Cheers,
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is one of the 3 kinds of primary keys you can have for any instance of any business object. Basically it is in most cases the UUID of the node.
Example:
Sales Quote has this on root level, but also every item has a NodeID (which holds basically the UUID of the item). The line item id could never identify a node across many sales quotes because it is only unique for one specific sales quote. I believe that is the reason why there is also a NodeID. Technically the item node is just a table of all items in the system across all sales quotes.
Cheers,
Jens
NodeID is the UUID of the Node. It works even if you send in UUID in the Read operation.
Well, as far as keyNavigation is concerned, I see the situation more in this way.
The outport which is fired in the source screen will have the column called Key. It doesn't necessarily need to be UUID there. When you use Key there in first screen, you should use keyNavigation in the subsequent Inport of your second screen.
Hello Jens,
You're right.
Example:
SalesOrder 15 with Items 10 and 20
SalesOrder 26 with Items 10 and 11
For the later Item 10 you need the SalesOrder to identify it.
So, you use a compund Alternative Key (SalesOrder / Item = 26 / 11) or define a new one which identifies this Item node => That's the NodeID
Add. to Srivastava:
Yes, in most cases it is a UUID, but it must not be one.
HTH,
Horst
That's not a good news for me...:(
So if i've a scenario like the follow:
Example:
CustomerQuote 15 with Items 10 and 20
CustomerQuote 26 with Items 10 and 11
For the later Item 10 you need the CustomerQuote to identify it.
So, you use a compund Alternative Key (CustomerQuote / Item = 26 / 11) or define a new one which identifies this Item node => That's the NodeID
how can i use the NodeID to access the item selected by the user?
I cant' understand how to do that inside a Custom BO (containing a AdvancedListPane) that i want to relate to a standard BO, in particular CustomerQuote.
Hello Marco,
First: You add an new
element MyItemKey : LANGUAGEINDEPENDENT_Name;
to your node Item.
Second: You define an AfterModify ABSL snippet for the Item node like
if (MyItemKey.IsInitial() = True)
MyItemKey = this.ToParent.ID.Concatenate( this.ItemID) );
Third: In the UIDesigner you bind the following elements from the Item node to your list
Now you can use all 3 flavours for the outport mentuioned by Jens on April 4th.
HTH,
Horst
Hi Alessandro,
you mentioned about AlternativeKey you have no doubts. Maybe you can explain it to me.
I have a Custom BO with 1:1 relation to Customer. Custom BO has an alternativeKey on CustomerID.
I bind my Embedded Component to the Customer-UI with the CustomerID and the eventHandler should make a BOOperation READ with alternativeKey CustomerID on my CustomBO.
For me that doesn't work. I put some code in the After-Modify and query my Custom BO and get the data I need. But it seems that the read in the eventHandler doesn't find anything.
Do you have an example on how to do that?
kind regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alessandro,
I created a custom BO:
businessobject StudioInformationHandler { | ||
[AlternativeKey] element CustomerUUID : UUID; | ||
element CustomerID : ID; | ||
association ToCustomer to Customer; | ||
association ToStudioInformation to StudioInformation; | ||
} |
That is an add-on to the customer.
I made an embedded component for the customer based on this BO. The EC has the CustomerUUID and CustomerID in the inport. In the event handler I try to read the BO instance with BOOperation.
When debugging my script in After-Modify I expect to have the persistent instance, but I have a new one. I can query my BO and get the persistent instance.
I think I make a mistake in the BOOperation but I don't know what's wrong. Another suggestion is that data binding in my EC is not as expected.
I attach a screenshot from my event handler and from the data model.
The CustomerID is not used at the moment. I tried it with the ID and UUID, but both didn't work for me.
I think there is something I didn't understand yet.
kind regards,
Frank
1) yes, I can see it with the query
2) yes, both
I tried with another Custom BO, but without associations. That works. Seems that it cannot handle associations.
But then I got other problems:
- the instance is loaded, but it seems that the systems wants to create a new instance with the same ID and that results in an error message
- if there is no instance to load (new entry), I get a message that nothing is loaded. Not usefull for the user.
So, I will go back to my ABSL coding. Seems that the READ operation is not intended to use in this way.
kind regards
Frank
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.