Tuesday 27 December 2016

Developing Extensions Using the New Visual Studio Code – Part 6


After finishing step5, today I would like to create an action in Job card page using visual studio code.

Requirement is to:
1. Create a “Default Reason Code for Lost Quote” in Jobs Setup table/page

2. When we click Action “Lost Quote” in Job Card, the “Default Reason Code for Lost Quote” from Jobs Setup should be added to “Reason Code for Lost Quote” in Job card.

Let’s first add field in Jobs Setup table and page as we did in previous step2 and step4.

Final Table extension for Jobs Setup table looks like below
Final Page extension for Jobs setup page looks like below
Build the package (Ctrl+Shift+B) and Publish (F5).

Now we can go to Jobs Setup page and notice the “Default Reason Code for Lost Quote” field at the end of General Tab.
As TableRelations are not yet supported, enter any value in field “Default Reason Code for Lost Quote”

Ex: “Budget Issue”
Now create an action in Job Card which should add same value from Jobs Setup to Job card field “Reason Code for Lost Quote” when action is executed.

Let’s modify object 70000001 which is created in step4.

Final page extension looks like this
Build the package (Ctrl+Shift+B) and Publish (F5).

Go to Job Card. We can notice new Action “Job Lost Reason Code”.
Clicking on Action will add Default Reason Code from Jobs Setup to Job Card.

This is how to add an action to page using page extension in visual studio code.
Stay tunes.


UPDATE: Above mentioned bug is fixed. Table Relation and lookup's are working fine now.

No comments:

Post a Comment