Skip to main content
Hi All,

I hope everyone is doing good. I turned up here for a valuable advise from all of you experts.

My usecase is as below:

We have 2 objects "Accounts" and "Orders". I need to update one field on account object called as "Upgrade Order Status"(API Name- Upgrade_Order_Status__c) which is a text field with the value of "Order Status" field of only that Order where new Order is being created as Order Type = 'Upgarde Order' or an already existing order with Order type='Upgarde Order' and status is getting changed.

Order type is a picklist field on Order object having multiple values in which "Upgrade Order" is one of among them. Account can have multiple Orders with different Order Type.But my use case is to populate account's "Upgrade Order Status" field with the Order status field value of recently created order having order type= "Upgarde Order' OR there is a change in Order Status field of an already existing Orders of type "Upgrade Order".

Illustartion:

Account Name: Account Demo

has 5 Orders with different Order Type

1. Order1 with Order Type= "ABC" with Order Status= "New"

2. Order2-with Order Type= "Upgrade Order" with Order Status="Open"

3. Order3 with Order Type= "XYZ" with Order Status="Open"

4. Order4 with Order Type="Upgrade Order" with Order Status= "New"

5. Order 5 with Order Type="ABCQRS"with Order Status= "Closed"

So we need to populated "Upgrade Order Status" with the status value of recently created/changed Orders's Status where Order Type= "Upgrade Order".So if suppose among 5 above mentioned orders if Order 4 is recently created  orders with Order Type="Upgrade Order" then "Upgrade Order Status" on account should be populated with value "New" because Order 4 is having Order Status= "New".

In case if we modify Order 2 and changed the status from "Open" to "Closed" then "Upgrade Order Status" on account should be populated with value "Closed" because Order 2 is recently modified order with order type=Upgarde Order.

Kindly let me know if any further inputs/clarifications needed on my question.

Any advise/suggestions/help will be greatly appreciated

Many thanks in advance

Thanks & Regards,

Harjeet
8 respuestas
  1. 2 sept 2018, 16:41
    Hi Harjeet,

    Everything seems to be fine. Please check the recordtype of the old records that you are changing.
0/9000