Adding fields to Lightning Pages

Prev Next

In the previous article, we went through the index objects and index values.

Now we will look at how we can make these fields available to users in order to manage indices.

 
Let's start with the basic steps in order to setup the fields on a page layout.

Adding fields to the page layout

Follow the steps here below, in order to add all the necessary fields of the following objects

  • Subscription

  • Subscription line item

  • Invoice

  • Invoice line item

  • Change order

and all of the necessary fields to be able to use the indices.

Please use the same procedure for all objects and fields.

Steps

  1. Go to the tab of the object you are interested in.
  2. Open a record.
  3. Click on the setup icon and then on Edit Page.
  4. Add the below fields by dropping them in between the existing fields. You can add a new section "index" if this helps your users.
  5. Click on Save.
  6. You will haveto repeat the same steps again for all of the objects mentionned below and fiels related.

Explaining the fields for each indice by object

Here is the list of fields you have added along with the descriptive explanations.

Index (ID)Formula (Text)
  • Index identification code, if the Invoice is linked to a Subscription.
Invoice date indexReference field
  • Index taken into account on the Invoice, at a specific date.
Index to date coefficientNumber
  • Value of the index coefficient, at a specific date.
Date pour indiceDate
  • Date used to calculate the Index Reference Value.

Invoice Line Item

Applicable IndexFormula (Check box)
  • If this box is checked, the revised unit price through the index calculation is applied.
Formula:
  • The box is checked if:
  • There is a Subscription Item linked to the Billing Line,
  • And on the Subscription Item the applicable Index box is checked,
  • And the Index Date on the Bill linked to the Billing Line is greater than or equal to the Index Reference Date of the Subscription Item,
  • And the invoice related to the Billing Line is not issued.
Index to displayFormula (Check box)
  • Checked if there is a subscription item linked to the invoice line.
  • And the box Index applicable on this subscription item is checked.
  • And the Index Date on the invoice >= Reference date for index of the linked subscription item.
Revised Unit price Formula (Currency)
  • New unit price excl. VAT calculated from the reference price (price list) to which a revised index is applied.
Formula:
  • If there is no Subscription Item related to the Billing Line,
    • the Unit Price excluding VAT is included.
  • If the Reference index coefficient field on the Subscription Item linked to the Invoice Line is not filled in,
  • Or the Coefficient index to date field on the invoice linked to the Invoice Line is not filled in,
  • Or the Applicable Index box is not checked,
    • The unit price excluding VAT of the Subscription Item linked to the Invoice Line is included.
  • If the Reference Index Coefficient field on the Subscription Item linked to the Billing Line is filled in,
  • And the Index Coefficient to date field on the Invoice linked to the Invoice Line is filled in,
  • And the Applicable Index box is checked,
    • Unit price before tax (Subscription Item) * Index coefficient to date (Invoice) / Reference index coefficient (Subscription Item).
Applied revised price Formula (Check box)
  • Determines if the revised price was used on the unit price.
  • Determines if the index was applied to an Invoice Line.

Subscription

Index
Reference (Index)
  • Allows you to enter an index (created before), when the subscription is in draft status.
  • The index is used to recalculate the total amount of invoices including tax from a certain date.
  • Example of index: Syntec index, which is used to measure the evolution of the cost of labor, essentially of an intellectual nature, for services provided.
Reference Index Value
Reference (index value)
  • Relationship to the index value used as reference.
  • Automatically defined by the Date field for reference index.
Reference index dateDate
  • Date used to calculate the reference index value.
  • Default = start date of the subscription.
Reference Index CoefficientNumber (5, 5)
  • Reference coefficient in order to calculate the revised price.
  • Automatically retrieved via the Reference Index Value relationship.

Subscription Line Item

Index Id

Formula (Text)

  • Returns the index ID entered on the Subscription.

  • Reminder: the index is used to recalculate the total amount of invoices including tax from a certain date.

Reference for index calculation

Formula (Text)

  • Indicates which record the index calculation is based on.

Formula:
  • If the Subscription Item is not linked to a rider: includes the Subscription ID.

  • If the Subscription Item is linked to a rider: includes the rider ID.

External IDText (255) (external ID)
Unique case sensitive
  • If the Subscription Item is associated with a record in a third-party system, you can fill in the Subscription Item ID from that third-party system here.
Index if applicableCheckbox
  • Indicates whether or not the index should be applied to the invoice lines from this Subscription Item.
  • Used in the formula to determine the Reference Index Coefficient.
Reference date for the indexFormula (Date)
  • Date used to calculate the Reference Index Value.
Formula:
  • If there is no rider related to the Subscription, the Index Reference Date of the subscription is adopted.
  • If there is a rider related to the Subscription, the index reference date of the rider is included.
Index coefficient referenceFormula (Number)
  • Reference coefficient in the calculation of the revised price.
Formula:
  • If the Applicable Index box is not checked, the number 1 is filled in.
  • If the Applicable Index box is checked and there is a rider related to the Subscription, the reference Coefficient of the rider is used.
  • If the applicable Index box is checked and there is no rider related to the Subscription, the Subscription's Reference Coefficient is used.

Change Order

Reference index dateDate
  • Allows you to find the reference index value of the chosen index.
  • Filled by Apex trigger:
    • If the field is not filled in manually, the start date of the change order is taken.
    • If you change this date later, the correct index value will be automatically filled in.
Reference index valueLookup (Index Value)
  • Relationship to the index value used as a reference.
    This field is automatically populated according to the Date for reference index field.
Index IDString (1300)
  • ID of the index
Reference index coefficientNumber (5, 5)
  • Reference coefficient for the calculation of the revised price.
    This field is automatically filled according to the relationship Reference Index Value.