function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maxi SMaxi S 

Need Trigger For Below Requirement

1.     Create Object call Flats and create fields as follow:
-     Name
-     Flat Types (Pick list) (1 BHK, 2 BHK, 3 BHK)
-     Rent (Currency)
-     Acquirable Date (Date)
-     Furnishing (Pick list) (Furnished/Semi Furnished/Unfurnished)

2.     Create Object call Enquiry and fields are as follow:
-     Enquiry Name
-     First Name
-     Last Name
-     Email
-     Phone Number
-     Rental Price(Currency)
-     Furnishing (Pick list) (Furnished/Semi Furnished/Unfurnished)
-     Flat Types (Pick list) (1 BHK, 2 BHK, 3 BHK)
3.     Create Junction object Matched Result: Auto Number as ID, Name of Enquiry and Name of Apartment.

Task to do:
1.     On Creation of new enquiry, Create Matched Result record. I.e. insert record in junction object whenever new Enquiry and Flats data matched. To creating new record match Rent, Furnishing and Flat Types fields from both the object.
2.     For Every new Enquiry first delete existing records from Junction object.

Maxi SMaxi S
I am a new in SF .. need help from someone ..
SwarnasankhaSwarnasankha

Hi Maxi S!

Are you new to SFDC as well as new to development? In this specific scenario, what type of help are you looking for - do you need an idea on how to structure your code or just an overal design suggestion?

From a business process perspective, I am curious to know why you would like to delete all Enquiries before creating a new enquiry because you can have different enquiries for the same flat from different people?

Kind Regards,
Swarna.