RightNow .NET Add-In - get logged in user info and trigger on read operations

Wanted to know if following is possible

1. From .NET Add-In control can we get who triggered the read/create/update or delete operation on account object?

say agent named "Jim" logs in to Right Now and updates the Account - i want to capture name - "Jim", what operation he intended "Query, Create, Update or Delete

2. I have created a rule in rightnow to call an add i when the account record is opened in an main editor. however the account infomation is not passed on to the Add-in as in case with Insert or update operations.

did i miss something or is it not possible?

im trying to build a read log for certain objects which does not have that capability currently.

also i would appreciate if anyone can post a code snippet or URL for inserting a record on to custom object in RightNow from Add-In (C#)

Thanks for any help



hi aravind

the current user can be found under the global context (IGlobalContext.Login)

I'm a bit unclear on what you're attempting to create. The Account object doesn't have an editable workspace, can't support add-ins and doesn't implement workspace rules. Do you mean the Contact object? That said though the account object does have an audit log for Create/Update, though not read or delete. A read audit could be created by using the AutomationContext to look at the current tab, but it'd be a bit hacky. For other standard objects make sure you're waiting for the DataLoaded event to fire before inspecting the workspace data, it won't reliably be populated until that event has fired.

To create rows on a CBO you will probably want to use the SOAP API or you can open a workspace of the appropriate type and let your agent populate the values.

Hi Jack

Sorry - Yes its for Contact object. I will give a try (on your suggestions - IGlobalContext.Login) and update here shortly on the results

the main objective is to capture / log who opens the contact record in the editor. i was able to create a rule which triggers the Add-In when the main editor loads. but im facing issues on how to get who opened the contact record in the editor and to insert a record in the custom object. with those info (Who opened "Name", rest is hardcoded like datetime.now() when, "Read" operation, "Contact" record which makes it a read log for the contact object.

will this model work or is there any other way to accomplish this?

thanks for your input - really appreciate it




Hi Aravind

You don't need to use a rule to trigger your add-in (though that approach will work) instead it will be simpler to just listen to the DataLoaded() event off the record context. After that you'll need to use the SOAP API (see http://cxdeveloper.com/article/creating-addins-using-connect-web-service... for a getting started tutorial) to create the entries in your CBO. Let me know if you run into problems.


thanks a lot



Zircon - This is a contributing Drupal Theme
Design by WeebPal.