If the contact is the user making the entry, that sounds more like the "resource" me: that way each of your users gets their own column on the resource view and "contact" can be reserved for who you user is meeting with.
But, you can do it either way. I think the way I'd tackle this is with a new auto-enter field that records the created-by account name of the user. Then, in the script "Create Edit Delete Event ( SourceNo, Operation ) { Hide, DateStart , DateEnd , TimeStart ... }" where it starts working with the contact id in line 170 I'd add a branch to say of $sc_ContactID IS empty and your contact ID field is also empty, the set the contact ID to the ID matching the name of the user recorded in your new created-by account name field.
I added the highlighted lines below. Note that it's just a case( ) statement being used to map account names to contact IDs and that we're just using the actual field names in your table (sample events::id_contact) instead of SetFieldByName: once DayBack is entered into your file you don't need to keep up the "abstraction" that makes the calendar so easy to integrate. You don't need to integrate it any more. Note that if you have multiple sources you'll either need to keep using the abstracted SetFieldByName or add an additional test to the Else IF statement to see if $sc_SourceNo = 1
- scriptelse.png (229.28 KiB) Viewed 16431 times
=)
Hope that helps.