• ALLUMULA VENKATA MANIKANT
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi Developers, I am new to salesforce, facing problem trying to figure out this question. 

Reuirement - Write trigger on user and create a field on user named - DateOfUser__c of type text. Create a custom object named - New_Object__c with fields as MatchingDates__c (type - date) and a lookup field to user named RelatedUser__c.
Whenever a user is created with a single value in DateOfUser__c field (means date in the format of MM/DD/YY) then a record should be created on custom object with same name as user's name and same date should be auto populated in the custom object's MatchingDates__c field. 
In addition to this if a user is created with multiple values seperated by ';' in DateOfUser__c field then records should be created on custom object based on the number of dates using spilt function. 

For example if I create a user - Ananya with Values in DateOfUser__c as : '01/29/2020;01/30/2020' then 2 records should be created in custom object with same fields as user's fields. 
Fields of user to use here are : Id, Name, DateOfUser__c
Fields of custom object to use here are : Id, Name, MatchingDates__c, RelatedUser__c

Any help will be much appreciated. 
Thanks in advance. :)