on 02-10-2016 2:12 PM
Hi Experts,
[1] - Small question ....
In my XBO component i want to read the Opportunity data for example OrganisationalUnit [CO_2101] - I can see it during debugging but how can i use it in a custom field.
It must be something like var orgunit = OrgansUnit.ID; but what I'm doing wrong pfffff (some code examples would be useful).
[2] - What is the easiest way to Update - a field in a BO (from an other Custom BO) - which is created by the KeyUserTool in the UI.
Regards,
Jeroen Cosijnse
Hello Jeroen,
1. You'd need to create a new element in your extension BO. Associations cannot be used on BO Extensions yet.
element {name} : {datatype};
2. You will need to create a "References to Customer-Specific fields", which you can include all KUT fields.
Note that when you select your KUT fields, it indicates also the node where it is located.
Best regards,
Victor Silva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jeroen,
1 - If you have the OrganizationUnit ID you can get its information using Retrive method. Import the correct namespace (i think is something like "import AP.FO.MOM.Global;") and type "OrganisationalUnit.Retrieve(params);". You also can use the available query "QueryByIDAndName" (see the BO documentation);
2- I think you can't access a field created in KUT in absl code;
Regards,
Alexandre.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexandre,
you can add a Customer Object References in the Studio once.
There you can select all Field which are created via KUT.
Then it is possible to access them also via Studio.
You will also need this, if you want to deploy a KUT Field to another Tenant, so you don't have to create them twice.
(This works for fields in XBOs. I didn't tried for fields from Custom BOs.)
Best regards,
Astrid
Hi Jeroen,
the association to RootOrganisationalUnit is a 0 to n association.
When you want to read the data of the first object you can try:
OrganisationUnit.GetFirst();
If you have more than one result, use foreach:
foreach(var element in Orgunit)
I hope this helps.
Best regards,
Astrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the first question:
add a custom field in your xbo definition with the keyword:
element <fieldname> : <type>;
in your absl:
<fieldname> = OrgansUnit.ID;
For the second question I can't help you because I never used KUT to create BOs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.