on 09-21-2016 11:04 AM
Hi All,
Here is my requirement.
I want to pass the value of Owner Sales (Marketing Lead) to the field Owner of the Account when the Lead is converted to an account via "Associate Account and Contact".
I am writing the code in On Save event of the account.
However I am not able to retrieve the data of Lead in the On save event of account.
Can you guys guide me on this one?
Also when I am trying to pass a hard coded value to the field (this.EmployeeResponsibleSales.EmployeeID.content), it is giving me an error that "NO access possible via NULL data reference".
I know I am missing something, but I am unable to figure it out.
Kindly see the attached document.
Regards,
Nikhil Moghe
Hello,
Yes. You are missing 2 things here:
1. .EmployeeResponsibleSales node is empty and you are trying to access it. So it is suggested that when you write the code just use IsSet() check before accessing it. For example, you should write:
if(this.EmployeeResponsibleSales.IsSet())
{
this.EmployeeResponsibleSales.EmployeeID.content= blah blah
}
2. I have doubt hat this node EmployeeResponsibleSales contains he info you need. Though I am not sure. In any case, try accessing Party node instead with RoleCode = <Role codeEmployee responsible> (just example). For right code, use repository explorer
Let me know.
Regards,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh,
Thanks for your response.
I am actually facing the issue that the Employee Responsible Sales is only set when the prospect screen comes up, not before that.
However I want to pass the value in this field before the account screen comes up.
Any idea how I can set the employee responsible node?
Regards,
Nikhil
Hello Nikhil,
You cannot assign value in an empty node. In that case, you have to use Create() function. Example :
var ele_ExampleNode : Customer.ExampleNode;
ele_ExampleNode.EmployeeID = "TESTID";
Customer.ExampleNode.Create(ele_ExampleNode);
In your case you can write your code in AfterModify Event of your XBO. This is the only option you have and keep your debugger ON to see when is this event called.
Regards,
Saurabh
Hi guys,
I figured it out myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.