Skip to Content
Author's profile photo Md Quddus

How to Utilize Field add using Key User Tool in script.

Hi All,

This blog post is to understand how we can use the field in script for writing the logic which added using Key User Tool (KUT).

Step 1: With Business user add the field where you want to add. In this case I am adding it on Sales Order. Open tenant in silver light mode. Goto Adapt->Enter Adaptation mode. After Adaptation mode is ON. Click on Adapt->Edit screen. On Right side of screen .Click on Extension Fields. Select the place where you want to add your field. In this case I am adding it on header level as shown in below image.

/wp-content/uploads/2016/02/1_1_888755.png

Step 2: Select the Oder Header and click on Add screen will appear as shown in below image. Select the field type: Text and enter the Field Label and Click on Save.

/wp-content/uploads/2016/02/2_888756.png

/wp-content/uploads/2016/02/2_1_888757.png

Step 3:  Select the field which you have created in the above step as shown in below image and then Save and Publish it.

/wp-content/uploads/2016/02/3_888764.png

After completing all the above steps. Field will visible as shown below image.

/wp-content/uploads/2016/02/4_888765.png

Step 4: If we want to utilize the KUT field in script we need to create Reference to customer-specific field.


Note:

  • You cannot reference a customer-specific field in a solution template.
  • You cannot reference a calculated field.
  • You can only reference a customer-specific field in the extension of a business object that has been released in the public solution model (PSM).

/wp-content/uploads/2016/02/5_888766.png

Step 5: When we create Reference to Customer-Specific field. Table will appear with all the extend field. Select  field which we have created in above step 1.

/wp-content/uploads/2016/02/6_888770.png

Step 6: Now Extend the business object where you we have add the field. In this case it is Customer Quote. Save and Activate the Extended BO .

/wp-content/uploads/2016/02/7_888771.png

/wp-content/uploads/2016/02/8_888772.png

Step 7: Right click on extended business object click on create script file. In this case I am selecting Root-After Modify Script and write the logic as per your requirement.

/wp-content/uploads/2016/02/10_888776.png

/wp-content/uploads/2016/02/9_888777.png

Activate the solution and Test the solution.

/wp-content/uploads/2016/02/11_888778.png

If any thing is missing please let me know.

Thanks,

Quddus.

Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Excellent ....

      Thanks for sharing this information ... 🙂

      Regards,

      Mithun

      Author's profile photo Md Quddus
      Md Quddus
      Blog Post Author

      Thank you 🙂

      Author's profile photo Former Member
      Former Member

      Thanks for sharing Quddus.

      Author's profile photo MOHD SIRAJUDDIN
      MOHD SIRAJUDDIN

      Thanks for sharing this helpful information Quddus. 🙂

      Regards,

      Siraj.

      Author's profile photo Chandan Bankar
      Chandan Bankar

      Hello Quddus,

      Great Work!!

      Keep them coming 🙂

      Cheers,

      Chandan

      Author's profile photo Md Quddus
      Md Quddus
      Blog Post Author

      Thank you 🙂

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello all,

      Be aware that the KUT field definition will be added to the ZIP file on assembly.

      If this field is not existing in the target tenant it will be created with exact the same definition as in the dev tenant.

      If the field is already existing in the dev tenant it will not be touched at all.

      This means as consequence you need the KUT transport mechanism if you want to transport any updates on the field definition (e.g. new code values, changed label, ...) from the dev tenant to any target tenant. ℹ

      Or you do the changes locally. 😐

      Bye,

         Horst

      Author's profile photo Md Quddus
      Md Quddus
      Blog Post Author

      Hello Horst,

      Thanks for the valuable information. 🙂

      Regards,

      Quddus.

      Author's profile photo Rafael Huapaya
      Rafael Huapaya

      Excelente.

      Author's profile photo Abdul Kalam Akula
      Abdul Kalam Akula

      Thank you so much Quddus for the valuable information.

      I just wanted to check on the same,

      Can we make KUT_COR.ref to refer multiple KUT Fields.???

      as its showing CHECK BOXES there to link them and its allowing me to select multiple check boxes in my SDK solution.

      I have a requirement of adding total value of 10 KUT Fields into another KUT Field. But Could not able to achieve using KUT Field Calculations while creating the KUT field as its allowing only 2 fields to add to the calculations.

      Can i achieve this by creating one KUT_COR.ref referring 10 KUT fields + TOTAL Value KUT Field and populate the total value on UI.??

      Please suggest on this. Thank you in advance for your valuable time.

      Best Regards,

      Kalam.A

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello Kalam,

      You can mark - if you want /need - all KUT fields of the .ref file. 😆

      Then they will become available in the ABSL coding.

      Bye,

         Horst

      Author's profile photo Abdul Kalam Akula
      Abdul Kalam Akula

      Thank you so much Horst..!! 🙂

      Author's profile photo Abdul Kalam Akula
      Abdul Kalam Akula

      Hi Horst,

      Once again thank you for the reply.

      Enabled KUT fields into SDK Script code & used in calculations.

      I'm about to deploy the solution and i have one doubt with the moving strategy to Test and Production tenants.

      1. If want to disable KUT field at later point of time from .Ref object & ABSL Code, Will i be able to do that once after deployment.??

      2. About moving to Production, Do i have to create KUT fields manually first with same technical ID's  or move the SDK patch first.?? Which one would be recommended one. Got confused, both approaches are mentioned above.

      Thank you in advance..

      Best Regards,

      Abdul Kalam.A

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello Abdul,

      You are able to modify (even delete) the complet .ref file

      If you deploy a patch with such a .ref field the framework checks if a KUT field exists with the same name. If no it will be created. 😆

      BUT: There will be no update to the definition of the KUT field.

      E.g. you have added some more values to a code list or enahnced the text, thoses changes must either be transported via KUT or applied manually. ℹ

      HTH,

         Horst

      Author's profile photo Abdul Kalam Akula
      Abdul Kalam Akula

      Thank you so much Horst..!! 🙂

      Author's profile photo Resmi V
      Resmi V

      Hello,

      I have added .ref file and selected the required field. After this ,I am able to use this field in the script.But the issue is Iam not getting the value user entered in this field in events.Based on this value , i need to do some validation.

      What am I missing here?

      Author's profile photo Pedro Freire
      Pedro Freire

      Hello,

      Thanks for sharing this great information.

      I followed all the steps of the procedure without a problem for the same BO, however, when I open a sales Order the extended field is always empty... Anyone else faced this problem?

      Thanks,

       

      Author's profile photo Jay Bhambhani
      Jay Bhambhani

      Hello,

      Thanks for the blog. Very informative and efficient.

      However I ran into a roadblock that I can access these KUT elements in ABSL at root level, but when it comes to child/ sub-node, I cannot access it, even though the they are checked in .ref file. Does that mean that this method is only to show roots at node level and have limitations at child level or I am doing something wrong ?

       

      I am trying to access the extension field via ABSL created at Item level in Customer Invoice. (however, any extension I create on root level is accessible in ABSL)

       

      Regards

      Jay