Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Differentiate between contact and account (customerid)"
No comments yet. -
1 – 0 of 0
if(opportunity.customerid.type == EntityName.account.ToString())
{
account account = (account)service.Retrieve(EntityName.account.ToString(), opportunity.customerid.Value, new AllColumns());
if(account.revenue != null)
{
opportunity.new_accountvalue = new CrmMoney();
opportunity.new_accountvalue.Value = account.revenue.Value;
}
}
else if(opportunity.customerid.type == EntityName.contact.ToString())
{
contact contact = (contact)service.Retrieve(EntityName.contact.ToString(), opportunity.customerid.Value, new AllColumns());
if(contact.creditlimit != null)
{
opportunity.new_accountvalue = new CrmMoney();
opportunity.new_accountvalue.Value = contact.creditlimit.Value;
}
}
service.Update(opportunity);
posted by fc at
5:25 PM
on Nov 21, 2007
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Differentiate between contact and account (customerid)"
No comments yet. -