Automatic generate a sales order line for every sales order [closed] - dynamics-nav

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Im experimenting with Dynamics Nav 2009.
Is there a way to automatically insert a sales line every time I make a new sales order?
I want postage to be included everytime Im making a new sales order.

There are two ways to solve this, one without programming, and one almost without programming.
If you postage line is a standard "charge" added to all orders then you can actually use the "Invoice Discount" functionality. Besides allowing you to assign an actual discount (typically being applied if the order is above a specific amount), then you can also use the functionality to add a "Service Charge". Either to be inserted on all orders, or only if the order total is below a certain "Minimum Amount".
You set it up by specifying the "Invoice Discount Code" field on the Customers and enable the automatic calculation in the "Calc. Inv. Disc." field in "Sales & Receivable Setup" table. The postage lines are not inserted as actual sales lines, but are calculated and applied when posting (or using the total / statistics button).
The other option is the use the "Standard Sales Codes". Here you can specify a number standard lines which are to be inserted whenever the standard sales code are selected. This is where I said a little programming is required, as the system doesn't automatically insert the lines. But you can insert a call to the function to insert the lines automatically when the customer no. has been entered.

This change would most likely require a modification from your NAV Partner.
The modification could add C/AL code to automatically insert a new Sales Line every time a new Sales Header record is created.
OnInsert()
SalesLine.INIT;
SalesLine."Document Type" := "Document Type";
SalesLine."Document No." := "No.";
SalesLine."Line No." := 0;
// Additional Code
SalesLine.INSERT(TRUE);

Related

After inserting one row for Ukrainian Language, the field in app page is showing ????? even after removing the row [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There is a TEXT_TRANS table which contains the translation of a specific word and they contain same textid but different languageid. Suppose there is a row in TEXT_TRANS table for the Name column 'Mohan' which has a specific textid and languageid . For Ukrainian language there will be another row for Name column 'мохан' which will have same textid as of english but different languageid. So I have inserted one row for Ukrainian language but forgot to put N before ukrainian word because it will show ?????. Then I updated correctly by putting N before the ukrainian word. However, The field is still showing as ?????? even when I deleted that row for Ukrainian language.
To store and select Unicode character in database you have to use NVARCHAR instead of VARCHAR. You need to be sure that column has correct datatype.

How to design a db on firestore or firebase realtime db for a rotating shift [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm not sure how to model a DB on firebase for a rotating shift. There's a 12 hour day and night shift and it rotates every 2 weeks.
My current hackish solution is to just use json and define every single day in a year with who's working day and night shift, like below. But it's obviously not optimal as I would have to define it every year, and I want it to be easy to add on other employee/shift details later.
year{
month{
day{
1{empX:night,
empY:morning;
}
}
}
}
I've looked into other answers and a few videos and search results but I couldn't find what I'm looking for. I'm also open to using mysql instead but I want to try using firebase because of the one-stop console.
Hope the question is clear enough.
If the employees don't change during the 2 weeks (meaning you don't need per-day customization, just per-2-week customization), would something like this work? I don't know enough about your needs, but this came to mind:
shifts (collection)
shiftId (Firebase generated doc id)
start (timestamp)
end (timestamp, 2 weeks later)
dayShift (array)
employeeId (string)
employeeId (string)
employeeId (string)
nightShift (array)
employeeId (string)
employeeId (string)
employeeId (string)

Select particular text from a varying lenght of text value field [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I have a column with following rows in it
"XX - Make a determination from receipt of request within 15 calendar days"
"Make a determination from receipt of request or necessary info within 2 business days"
"YYYYYYY - Make a determination from receipt of request within 72 calendar hours"
"ZZZZZZZZZZZ - Make a determination from receipt of request within 30 calendar days"
and all types of different combinations with a similar pattern of
"XXXXXXXXXXXXXXXXXXXXX" from "text I want to get" within ZZZZZZZZZZZZZZZZZZZZ
The length of X and Z changes and so does the text between from and within but the from and within always exists in the text. How do I make a query to get the text I want to get into a table variable so that I compare it against other columns in the same table and see if they match or not?
I have the table variable and scalar variable in place to get the values. I just need the proper select statement.
This is really ugly. Fix the table and stop storing different data points inside a string you need to parse like this every time. If your supervisor doesn't understand why this is bad, ask him if he likes to re-program his remote control every time he turns the TV on.
SET NOCOUNT ON;
DECLARE #t TABLE(c VARCHAR(8000));
INSERT #t VALUES
('XX - Make...ion from receipt of request within 15 calendar days'),
('Make a de...ion from receipt of request or necessary info within 2 business days'),
('YYYYYYY - Make...ion from receipt of request within 72 calendar hours'),
('ZZZZZZZZZZZ - Make...ion from receipt of request within 30 calendar days');
SELECT SUBSTRING(c, 1, CHARINDEX('within', c)-1) FROM
(SELECT c = SUBSTRING(c, CHARINDEX('from', c) + 5, 8000) FROM #t) AS x;
Results:
receipt of request
receipt of request or necessary info
receipt of request
receipt of request

ORACLE select lacks row [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I use ORACLE setup RAC cluster.
My problem is when DB got problem (still dont know the reason ) my sql select lacks rows
example:
select *
from student_detail
where student_id = 1231
should return 10 row data of student have id 1231, but in this case just return 6 rows
can anybody help me to understand this problem!
As a general observation, an Oracle SELECT always returns the correct number of rows. If the result set does not match your expectation then there is a problem with your understanding.
For instance you may have miscounted the number of rows with student_id = 1231. If the query returns only six rows how do you know there are supposed to be ten? It might not be as simple as eyeballing ...
select * from student_detail
order by student_id
... if student_id has a varchar2 datatype and some IDs are suffixed with stray spaces. A query like this will diagnose that problem:
select student_id, count(*)
from student_detail
group by student_id
order by student_id
Other possible causes? A misleading view? Row Level Security restricting the result set? Some bizarre client-side configuration which only shows the first six rows instead of the entire set?
You mention RAC. RAC uses a mechanism called the Global Cache Service Process to transmit changed data to different nodes. It is possible you are experiencing a failure in this process. Talk to your DBA and get them to investigate.
Maybe, the data should be wrong.
for example, if the data of user_id is '1231', that's not wrong, but if the data is left gap
like ' 1231', you can't see the data.
' 1231 ' , '1231 ' also can not be printed out.
The solution is when you insert some data, use the function 'trim' or 'replace'...
trim is only remove left gap.

Unable to show report in desire format [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I asked this question before and someone vote down myquestion saying that this question is not valid. I have spent three days on this problem. So please if you do not understand it , it does not mean that the question is invalid. Here it is:
I have created a SSRS report. I am facing problem with respect to page break and Grouping.
Here is the out put of my report.
On each page I want to show record group by Landing Date and Buyer Name.
That is on first page following should be shown:
Buyer Name Landing Date Actual Price
SHETLAND 06-Jan-05 100989.754569257
On second page:
Buyer Name Landing Date Actual Price
SHETLAND 11-Jan-05 1096677.95045137
On third page:
Buyer Name Landing Date Actual Price
FRESH 14-Jan-05 300080.972657965
SHETLAND 14-Jan-05 157372.157557842
==========================================================================
I applied Grouping using group properties , but no effect. Basically I want to show records with same landing date on one page.
Try to create Grouping on two level (nested). That is first group by Landing Date and then right click on newly created group and create a child group . and in child group create expression to group by Buyer Name. Hope it will work.
You need to add a row group with the group by on Landing Date and Buyer name, and then in the group properties tick the check box for 'Add a page break between instances of a group'

Resources