• KPD
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hello all.Can someone help me in creating trigger for below scenario.
I Created two custom objects event & event attendees. Event attendees has two masters event & contact.Event has a lookup to account. 

​Now i have to achieve below using a trigger.
As soon as the event attendee is created, a welcome message "Welcome to the <EVENT NAME> " should be updated on description field on contact. If same contact is registered for multiple events then Message should be displayed in a different line.
  • October 06, 2016
  • Like
  • 0
Hello all.
Can someone help me in creating the visualforce page for following requirement:

Page should take input from user first name , last name .
User should be able to click on create contact button.As soon as user clicks on the create contact button, a contact in system should get created and show the salesforce id of the contact created on visualforce.
  • October 04, 2016
  • Like
  • 0
Hello can someone help me on below trigger.
I have a scenario that If account is updating for phone number then all associated contacts phone number should update with same number. 
I wrote the trigger as below.It doesnt throw any errors but the phone number doesnt gets updated.

trigger phupdate on account (after update) 
{
List<contact> ctlist =new list<contact>();
List<Id> ids = new List<Id>();
for(account ac: trigger.new)
{
ids.add(ac.Id);
}
Map<Id, contact> contactMap = new Map<Id, contact>([Select Id, Phone From contact Where Id In :ids]);
for(account ac: trigger.new)
{
contact c = contactMap.get(ac.Id);
if(c != null)
{
ac.Phone= c.Phone;
ctlist.add(c);
}
}
update ctlist;
}
 
  • October 02, 2016
  • Like
  • 0
Hi all.Can somone help me in writing triggers for below two scenarios.
1.Create opportunity if account is created.  If Existing account is updated, then if opportunities under that account are not available then create one opportunity.

2.On a custom object check if the duplicate record is getting created on the basis of name. If duplicate record is getting created then user should get an error message "Record with same name already exist".
  • September 30, 2016
  • Like
  • 0
Hello can someone help me on below trigger.
I have a scenario that If account is updating for phone number then all associated contacts phone number should update with same number. 
I wrote the trigger as below.It doesnt throw any errors but the phone number doesnt gets updated.

trigger phupdate on account (after update) 
{
List<contact> ctlist =new list<contact>();
List<Id> ids = new List<Id>();
for(account ac: trigger.new)
{
ids.add(ac.Id);
}
Map<Id, contact> contactMap = new Map<Id, contact>([Select Id, Phone From contact Where Id In :ids]);
for(account ac: trigger.new)
{
contact c = contactMap.get(ac.Id);
if(c != null)
{
ac.Phone= c.Phone;
ctlist.add(c);
}
}
update ctlist;
}
 
  • October 02, 2016
  • Like
  • 0
Hi all.Can somone help me in writing triggers for below two scenarios.
1.Create opportunity if account is created.  If Existing account is updated, then if opportunities under that account are not available then create one opportunity.

2.On a custom object check if the duplicate record is getting created on the basis of name. If duplicate record is getting created then user should get an error message "Record with same name already exist".
  • September 30, 2016
  • Like
  • 0
hi all,

I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable  to delete it
Any help would be highly appreciated

Its very urgent,
Thanks,