Tech Support > Microsoft Windows > Windows CRM > account & incident
account & incident
Posted by ismail on October 22nd, 2007


Hi,
is it possible to put some code on Onload event of "incident" entity, so
that every time a new incident is created, always the same "accont" is
written to the lookup field in the incident entity?

Posted by Aamir on October 22nd, 2007


what u mean ? some predefined account GUID?



/Aamir


Posted by ismail on October 22nd, 2007


exactly.

"Aamir" wrote:

Posted by Aamir on October 22nd, 2007


check here

http://www.stunnware.com/crm2/

there is another way to create through .Net Assembly (workflow).

OR

use Wokflow on Create
when incident is created
Inser action--------Update entity -------------
accountname ......equals -----------xyz

(i havent tested it)

Posted by ismail on October 22nd, 2007


Thank you for your reply. I have tried your second suggestion (workflow). I
have succesfully created the the rule and activated it. But while testing the
lookup button is not populated when an incident created. I have closed and
reopen crm (even restart IIS), but the lookup button is not populated with
the accountname.

"Aamir" wrote:

Posted by Aamir on October 22nd, 2007


i know the reason . I believe the easy was is :

retrieve the ID of newly created incident and then use the .Net
assembly to update it .



// incident test = new incident();
// test.customerid = new Customer();

test.customerid.type = EntityName.account.ToString();
test.customerid.Value = new Guid("");

/Aamir

Posted by ismail on October 22nd, 2007


thank you Aamir. it works now.

"Aamir" wrote: