• Marcelo Velame 1
  • NEWBIE
  • 0 Points
  • Member since 2023
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have a scenario that when the picklist type field value is updated, the field is also updated in an integration of external REST API services (endpoint: https://api.boxlink.com.br/v2/tracking ).

The cloud I'm working on is Sales Cloud and the integration via an App connected with Boxlink is already done.


OBJECT:
Label: Seller Request
API name: SellerOrder__c

FIELD:
Label: Status OMS
API name: StatusOMS__c

Picklist list value:
  • Order Approved
  • invoiced order
  • order error
  • dispatched order
  • Order resent
  • Order Ready to Pick Up
  • Order Delivered
  • Request declined
  • Order Withdrawn
  • canceled order
  • Order Returned
  • Order in Transit


Endpoint: https://api.boxlink.com.br/v2/tracking


What is the best way to update the field? Could you help?
I have a scenario where I want to make an Apex Trigger so that when a record is inserted or updated when I click on save, the trigger is triggered.
The object that the trigger will be started will be in a custom object and updated in another custom object.

I created a lookup field in object 2, in this case the PropertyInformation__c object relating to object 1, Properties__c.


Objects:
  • Object 1: Properties__c
Fields:
  • PropertyType__c      - data type: picklist with values ​​(Apartment, Commercial, Land, Home, Office)
  • PropertyForSaleOrRent__c      - data type: picklist with values ​​(Rent, Sell)
  • NumberOfRooms__c - number data type
Object 2: PropertyInformation__c

Lookup Field: ResponsibleBroker__c
 
  • Fields to be updated:
  • PropertyType__c
  • PropertyForSaleOrRent__c
  • NumberOfRooms__c

How could I be creating the apex trigger to be able to update the fields in object 2?
I have a scenario where I want to make an Apex Trigger so that when a record is inserted or updated when I click on save, the trigger is triggered.
The object that the trigger will be started will be in a custom object and updated in another custom object.

I created a lookup field in object 2, in this case the PropertyInformation__c object relating to object 1, Properties__c.


Objects:
  • Object 1: Properties__c
Fields:
  • PropertyType__c      - data type: picklist with values ​​(Apartment, Commercial, Land, Home, Office)
  • PropertyForSaleOrRent__c      - data type: picklist with values ​​(Rent, Sell)
  • NumberOfRooms__c - number data type
Object 2: PropertyInformation__c

Lookup Field: ResponsibleBroker__c
 
  • Fields to be updated:
  • PropertyType__c
  • PropertyForSaleOrRent__c
  • NumberOfRooms__c

How could I be creating the apex trigger to be able to update the fields in object 2?