I have a customization in which the user can adjust the quantity of an SO Line from a different page. This works perfectly, except when the user goes to execute the action "Create Shipment" for that SO. When "Create Shipment" executes, the shipment record created reflects the original values the user put in for the line's quantity instead of the adjusted quantity. Here is an example:
I created an order with original SO quantities of 10 and one respectively. I then changed the quantities to 8 and 5 respectively through my customization page:
This is the shipment I get when I select Actions -> Create Shipment:
I have looked through and adjusted any numbers misrepresenting the values I desired in the SQL tables SOOrder, SOLine, and SOLineSplit, but I still get the incorrect values when creating a shipment. Is there a table I am missing?
Sounds like the issue could be the PlanQty found on the related INItemPlan record which the Create Shipment process uses to create the shipment.
Might be worth looking into getting the SOLine updated via the SOOrderEntry graph or make sure the INItemPlan values are getting updated correctly. Maybe a missing view in your custom page. I think the values are updated from the attribute on PlanID of SOLineSplit if that helps.
Related
We want to have a sales order dashboard where we only show orders for certain sales people based on the logged in user. For example, we have sales people BB and CR who share an assistant TP. BB can see his orders on the dashboard. CR can see his orders on the dashboard. TP can see orders for both of them on his dashboard. We also have people outside of sales who need to see all orders. We want to do all of this without having to create a bunch of custom dashboards. We wanted to maintain 2 dashboards - one filtered one for sales people and one unfiltered one for everyone else.
We have gotten close to solution by using a generic inquiry. We created custom fields on the salesperson that point back to a logged in user (UserID1 and UserID2). Multiple custom fields were used because a single sales person could be visible to 2 people. We then joined SOOrder to SalesPerson inside our GI. We then wanted to join the Users table on (SalesPerson.UserID1 = Users.PKID AND SalesPerson.UserID1 = #me) OR (SalesPerson.UserID2 = Users.PKID AND SalesPerson.UserID2 = #me). That would allow us to create a filter where Users.PKID is not null to limit the view for sales people and then not use any filter on the non-sales dashboard.
The problem is that #me is not available on the Relations section. It is only available on the conditions section. We tried to just have the join of SalesPerson.UserID1 = Users.PKID or SalesPerson.UserID2 = Users.PKID and then creating the condition for the #me portion. The issue there is that it only shows records with a match. That won't work for non-sales people.
Is there some way to include #me or an equivalent on the relations tab? Any better way to accomplish this?
Built-in variables like '#me' aren't well documented which raises questions about support of this feature.
Try this instead:
In generic inquiry TABLES tab, add table 'PX.Data.AccessInfo'.
In PARAMETERS tab, add a new parameter (ex: 'P1') and set the Schema Field value to 'Accessinfo.UserID' (use 'Accessinfo' or the alias for that table declared in TABLES tab).
In the RELATIONS tab in the join condition Child Field you can reference the '[P1]' variable.
Accessinfo DAC contains current record of the logged in user and reflects the information you see when you click your profile in the top right of Acumatica pages. If the solution doesn't work right away you can debug it with the Request Profiler page to look up the generated SQL query for the GI.
Created a view and added to DAC and can view correctly in Generic Enquiry. However when added in Report Designer it returns correct number of rows but the data is just repeated form the first row. Any ideas?
Ensure your view contains CompanyID field and DAC has proper key(s) defined.
I have created a custom screen that records a "SalesPerson" ID that links back to the Salespersons records.
One of the requirements is to create an inquiry screen (not generic inquiry) that has a filter for the current sales person (based on logged in user). The Filters should be "All Records" / "My Items" with the second being the default displayed (based on the recorded "Sales Person)
For this, The PXSelect statement links {customtable} -> {employee} (where salesperson record = employee.salesperson
I even extended that to link employee.userId -> users.pKid.
The actual select statement is below:
public PXSelectJoin<CWAItem,
LeftJoin<EPEmployee,On<CWAItem.salesPersonID,Equal<EPEmployee.salesPersonID>>,
LeftJoin<Users, On<Users.pKID,Equal<EPEmployee.userID>>>>> MobileOrders;
Both of these correctly display the user name in the grid however when i create a filter where EPEmployee__UserID = #me or Users.UserName = #me no records are returned.
Scanning through the system this appears to be used on the "WZ201500" screen that has a simular filter. The difference that I see is this is referencing "EPEmployee_UserId" based on the table definition.
Is there a limitation to using child DAC's and the #me or is there a different way to handle the joins so the #me works correctly?
Any assistance would be appreciated.
Having not used #me I am not sure what this refers to, however we did something similar limiting records based on the current user ID using access info like such:
Where<EPEmployee.userID, Equal<Current<AccessInfo.userID>>
Hope that helps
Just use the Table AccessInfo then Default Value of your Filter Equals to AccessInfo.UserID to any of the Table Field you need like CreatedByID or ModifiedByID
I have a form where I need to include a calculated field. I made a very simple test using a calculated field where the formula is "=ID". I just want to confirm that the value I'm getting in the view is the same as the ID of the record in the list.
I press NEW and create a new record. Then when I see the new record in the view, the first column is the ID (let's say 11), then some proper fields form the form and finally the calculated field that instead of showing me the value 11, it shows 0.
Then I follow the following steps:
I go to Settings, List Settings
Click on the calculated field to edit it (only edit it with no modifications) and press on OK (no modifications to the calculated field at all)
Go back to the list of records and now the calculated value shows me the value 11
I google it but no solution.. there is someone say that this issue is from the column ID, it mean 'when you initially save the item is that there is no value for "ID" yet' !
and this isn't my state, the column id is incremented normally when add new item.
Anyone can help me to identify with the calculated field does not shows 11 automatically after the record is saved?
or by follow another solution like using a workflow 2013..
Thanks a lot
You can not use [ID] in a Calculated Column formula.
I won't bother with the long technical explanation...
If it was possible, Microsoft would have added it to the list of Fields you can select when writing a Formula.
Workaround is to make a simple SharePoint Designer Workflow which kicks off on Item creation and saves the ID value to another Column.
You can then use that Column in your Calculated Formulas
If you're doing anything front-end.. jQuery.. CSR/JSlink.. the ID value is available in the attribute id of the Item TableRow (TR) as x,id,y
so you can get the id with
var ID={element}.getAttribute('id')[1]
Update #1 - example code used:
="<a href='/sites/ru1/Lists/ao26c/DispForm.aspx?ID='
target='_blank'><img src= '_layouts/images/blank.gif'
onload= ""var row=this;
while(row.tagName!='TR'){row=row.parentNode};
this.parentNode.href+=row.getAttribute('id').split(',')[1];
"">Открыть</a>"
I finished the JDeveloper Cue Card "Build a Fusion Web Application" which is pretty basic and shows you have to update a parent( ORDER ) table and view the child ( ORDER_ITEM ) rows associated with the parent record. This is all fine but of course in the "real world" you would need to update/add items to an order. Naturally after add/updating the ORDER_ITEMS table you would want the ORDER_TOTAL value in the ORDER table to reflect the change. In other words, if you double the quantity of one of the items, the ORDER_TOTAL value in the ORDER table should increase.
So to expand on the Cue Card, I added another page which allows me to update the values in the ORDER_ITEMS table which works fine - this is just out-of-the-box ADF magic.
I tried to post an image of my task flow but my reputation level isn't high enough. I guess I have to play the game longer to earn more guild points :) Here's a link to a picture click here I originally posted this question to the Oracle User Group but got no responses so I thought I would try this forum.
I tried two ways to update the ORDER_TOTAL in the ORDER table after an add/update to ORDER_ITEM table.
1) Modify the orderview to include a nested select statement which calculates the ORDER_TOTAL dynamically
SELECT Orders.ORDER_ID,
Orders.ORDER_DATE,
Orders.ORDER_SHIPPED_DATE,
Orders.ORDER_STATUS_CODE,
(select sum(unit_price * quantity) from order_items a
where a.order_id = Orders.order_id
group by order_id )
AS ORDER_TOTAL,
Orders.CUSTOMER_ID,
Orders.SHIP_TO_NAME,
Orders.SHIP_TO_ADDRESS_ID,
Orders.SHIP_TO_PHONE_NUMBER,
. . . .
2) Add an update to the ORDER_TOTAL value in the ORDER table with in the task flow after an add/update to ORDER_ITEM table and COMMIT.
update orders set order_total = ???? where order_id = ????
With either solution, I get the same results which is as follows
I update the ORDER_ITEM table in the editOrderItem.jsff page, the task flow performs a COMMIT and returns to the editOrder.jsff page, ORDER_TOTAL amount does not reflect the change. Hitting cancel from editOrder.jsff returns to order.jsff which show the correct ORDER_TOTAL amount. Returning to editOrder.jsff from order.jsff and the correct value for ORDER_TOTAL appears. It seems that the values in the ADF form inside order.jsff are cached and the page never refreshes against any updates to the database. I've tried to make editOrder.jsff refresh by changing the properties from refresh "true" to "false". Also changed CacheResults from "true" to "false". Tried modifying the task flow properties from "no controller action" to "Always Begin New Transaction".
You need to re-execute the query containing the ORDER_TOTAL after you committed the ORDER_ITEM modifications.