Hello.....
I have only one structure (sales tax structure) in the database.
But still I need to select the structure from the drop down list.
How can I bring the structure automatically in the purchase and sales documents?
-- Harsha
Hello.....
I have only one structure (sales tax structure) in the database.
But still I need to select the structure from the drop down list.
How can I bring the structure automatically in the purchase and sales documents?
-- Harsha
This need a bit of coding :). In 2 areas you write your codes -
a. Sales header:
- in INITRECORD() function, go to the end of all codes and put the following 1 line
Structure := '<your structure>'; (put your structure name in single quotes). Say your structure name is 'STRUC01' so last 3 lines of INITRECORD() function will look like as below:
"Responsibility Center" := UserSetupMgt.GetRespCenter(0,"Responsibility Center");
"Time of Removal" := TIME;
Structure := 'STRUC01';
Compile it , re-login and try. This will work whenever you are creating a new sales document (Invoice, order, credit memo) but will not work while you are modifying an existing document.
Do remember, this is a bit hard-coded and it will always pick up the same structure code (even if you have more structure codes in your setup in future). But you have the option of changing the structure once the default structure is selected.
b. The same coding you can follow for the purchase header too in the INITRECORD function.
Try this out. Best of luck.
Hi Harsh,
Another option is to set the structure code on customer and vendor card. There is a field available in both the table so if you set the structure code on it then in sales order and purchase order respectively. it will auto populate on selection of customer or vendor code.
This will work for your requirement.
Regards,
Saurabh Shah
Hi Harsh,
You can customize it by writing code in OnInsert trigger.
Not possible in standard Navision
but you can write code in OnInsert trigger of tables 36 and 38.
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,558 Super User 2024 Season 2
Martin Dráb 228,647 Most Valuable Professional
nmaenpaa 101,148