hi.
i want to link customer and sales person on sales order, for this goal, i set each customer with sales person in customer from, but when i create a sales order and select a customer, it is possible to change sales person and i want to be a relation between customer and sales person that no body can change it. have solution?
Regards
*This post is locked for comments
Muchas gracias por su aporte. Fue de gran ayuda!
Thank you for your contribution was helpful!
Hi
Modify the initFromCustTableIL method of the SalesTable Table.
Add the line below to the bottom of the method:
this.WorkerSalesResponsible = this.custTable_CustAccount().MainContactWorker;
Launch Incremental CIL.
If you want to follow the best practices, you have to create a new Event Handler Subscription, set the CalledWhen property to Post and move the code in the new class\method.
Hi NITESH RANJAN. i do what you say, but it works like my code. sales responsible on form has value and when i select customer on salescreateorder form, field sales responsible get null.
regards
hmmm...
this.WorkerSalesResponsible = DirPartyTable::findRec(contactPerson::find(custTable::find(custTable.AccountNum).ContactPersonId).recId).recId
Find this, and check if this works
Actually you need to find out worker RecId of Contact person, which is same as DirPartyTable recID
Please verify this and update if it works..
in CustTable, field "MainContactWorker" is field Employee Responsible on form customer. i want this field be retrieved when i select customer on form "SalesCreateOrder", and replace on sales responsible field that is on "SalesCreateOrder" form. what can i do?
Regards
hi. i do what you say before but get error that Operand types are not compatible with the operator.
this.WorkerSalesResponsible = custTable::find(custTable.AccountNum).ContactPersonId;
Regards
I don't think MainContactWorker is the correct field it should be ContactPersonId
Please try using this field.
Hi.
I provide just this code on initfromcusttable method but when i select customer, sales responsible doesn't field in, and get null value.
regards
if (this.CustAccount)
{
this.WorkerSalesResponsible = custTable::find(custTable.AccountNum).MainContactWorker;
}
You have ContactPerson Table
You can find record in Contact Person Table related to CustAccount as per you SalesTable.
Please verify and update this helps you.
Hi.
how can i find customer's contact person in the method initfromCustTable()?
regards
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156