0

I am dealing with alerting whether call/meeting slot is available or not before a user saves a call/meeting. My task mainly deals with the editing part. There are two approaches to edit a specific call.

  1. Select a particular lead in leads page -> go to detail view -> Log Call -> save -> come back to same lead detail view again -> click on edit call in the activities subpanel. Now if you check the URL, you see a url parameter with name "record=abcde-fghi..." which I am using during validations.
  2. Now go to activities menu on the top and in the calendar you see all the held calls. Click on a particular call and then edit it. Now in the edit page, when you check the URL, you don't see "record=abcde-fghi..." url parameter which is useful for me to do validations. How to get the record id in this case?

When I checked the save function, it is accessing this id from $bean. But I don't know how to access this bean before saving the call to database.

I am taking the form parameters- startdate, mins, hours, parent_id, user_asign_id etc and triggering an ajax call based on the record id for first case above, But I am missing record id for second case to validate the call/meeting.

Please help. Thanks in advance!

Star
  • 3,222
  • 5
  • 32
  • 48
UdaySagar
  • 83
  • 13

1 Answers1

0

The id is only being generated after you save the record, of course. And that's why you don't see any id in the url above.
A workaround is to use a different ajax call, depending on whether you have the id or not. You could use '-1' as your id and check the server for this '-1' id.
Hope it helps

Moutabreath
  • 184
  • 1
  • 6
  • 19