Create a enum field named as "ABC code" and create enum value as below and Add this enum field in the customer master in general tab -
a) None b) A C) B D) C
Add ABC code in the sales order and this value should come from customer master for the associated customer for the Sales order.
Can you please help me
No need to declare VendTable buffer again. I think you are trying to re-use code I provided earlier for custTable. Please note that initFromCustTable method does not have CustTable table buffer as parameter but initFromVendTable have vendTable buffer which should be used. Code provided by Girish will work.
If Fixed, don't forget to Verify answer/s that helped you by clicking Yes to Did this answer your question?
Thank you Girish S
You already have vendTable buffer in the argument of the method. Just use that buffer and see if it works.
[ExtensionOf(tableStr(PurchTable))] public final class PurchTable_Extension { public void initFromVendTable(VendTable _vendTable) { next initFromVendTable(); this.ABCcode = _vendTable.ABCCode; }
Thanks,
Girish S.
You can add breakpoint in add method of info class and in call stack check where its throwing this error.
[ExtensionOf(tableStr(PurchTable))]
public final class PurchTable_Extension
{
public void initFromVendTable(VendTable _vendTable)
{
next initFromVendTable();
VendTable vendtable = this.vendTable_OrderAccount();
this.ABCcode = VendTable.ABCCode;
}
In this line I'm getting error while Debugging
VendTable vendtable = this.vendTable_OrderAccount()
You need to debug the code and find out on which line the error is throwing.
Thanks,
Girish S.
I'm trying for same requirement in vendtable(all vendors) and pruchtable (all purchase orders) but I'm getting error while creating new purchase order "object reference is not set to an instance of an object".
Here in this requirement I need to change the code or some other process.
Can you give an idea for this
Kind regards
learner.d365 That's great, please mark answer verified.
Thank you very much Girish S for your information.
Thank you very Mohit Rampal
You have given code is working fine.
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... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156