• TestCommunity1
  • NEWBIE
  • 0 Points
  • Member since 2012

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

We know how field dependencies work. Now we want to make more questions like text boxes dependend of one question. So if you fill in that one question it reveals 6 other questions or not depending on the answer. So we are looking for something similar to field dependencies, but then we want to make other question dependend like text boxes, multi-picklist. 

Hi,

 

I've scoured the board and there seems to be plenty of examples of how to create new records in objects based on other submissions but my requirement seems a little more complex.

 

I currently have a mobile app submitting incident tickets into SFDC.

 

At present when a new incident__c record is created an APEX trigger finds the correct account that needs to fix that incident and attachs the account ID onto the ticket through a related field.

 

Then I can go to my account and see a list of related incident tickets that have been created on the account page.

 

So far, so good. What I now need to do is take this a bit further. I have created a new object called App_User__c and I want to do the same. However, the amount of Accounts is fixed, so I already have them created in SFDC. The users aren't known to me until they submit so I would like to 

 

a) Check if the app_user__C already exists based on their email in the incident__C object.

b) If not, create the app_user__C and copy 5 fields from the incident__c to populate the object

c) On creation or successful query, link the App_user__C ID to the incident__C ticket so I can see all incident's linked to my users on their page in SFDC, just like I can with Accounts.

 

Is this one trigger?  Many?

 

Any thoughts gratefully received!