Jump to content

Why are records not visible in portal


Oyseka

This topic is 2595 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi All, When I add records to a quote they may be added in multiples until the Quote is accepted. When a quote is accepted I now have to change any multiple service Products to single products to allow for the creation of the barcodes,(serial numbers), used during the service so that any parts used on the product are recorded against that particular product. I created a script which checks for any service Products that are showing multiples and duplicates them the required number of times. The duplication works fine in the QuoteItems layout but unless after duplication, I select either the department or product, then the items do not show in the QuoteItems portal on the Quotes layout despite the Qty being reduced from whatever it was set at to 1 and the Quote Total is incorrect.

Screen Shot 2017-03-12 at 12.55.50.png

Screen Shot 2017-03-12 at 12.56.09.png

Screen Shot 2017-03-12 at 13.03.42.png

Screen Shot 2017-03-12 at 13.04.03.png

Screen Shot 2017-03-12 at 13.05.41.png

Edited by Oyseka
Attache missing images
Link to comment
Share on other sites

Exactly how are you duplicating them?  I can only assume when you create the records you are doing them thru the portal and the relationship is setting the proper key fields, and when you duplicate them, one of the key fields is not being set.

Maybe you can diagnose this by putting all key fields either in the portal or on the proper layout.  Then when you duplicate, see if those fields are properly populated.

Link to comment
Share on other sites

Hi Steve, the key field is the QuoteId and as you can see on the 4th screenshot, that field is populated correctly. Just to explain the screenshots; Image 1  shows  the Quote Layout denoting the QuoteId and the Products as viewed in the portal. note that items 4 and 5 have a Qty greater than 1, Image 2 shows the QuoteItems layout which contains the details of those Products with the corresponding Qty.

Image 3 shows the Quote Layout after the duplication has been run and Image 4 shows the QuoteItems layout after the duplication has run.

Image 5 shows the Quotation after any of the Portal rows have been selected and exited with no further input. At first I assumed it was a refresh or commit problem but I have committed all records on creation and refreshed the Quote window when the record is accessed 

This is the script used to duplicate the Products:

Set Error Capture [ On ]

Loop
Set Variable
[ $QuoteId; Value:Quotations::__QuoteId ] Go to Layout [ “dLayQuoteItems” (QuoteItems) ]

Enter Find Mode [ Specified Find Requests: Find Records; Criteria: QuoteItems::QTY: “>1” AND QuoteItems::_QuoteId: “$QuoteId” AND QuoteItems::ServiceFlag: “=1” ]
[ Restore ]

Perform Find [ ]
If [ Get (LastError) = 401 ]

Go to Layout [ original layout ]

Exit Script [ ] End If

Go to Record/Request/Page

[ First ]

Set Variable [ $QTY; Value:QuoteItems::QTY ]

Set Field [ QuoteItems::QTY_Count; $QTY ]

Set Variable [ $QTY_Count; Value:QuoteItems::QTY_Count ]

Insert Calculated Result [ QuoteItems::QTY; 1 ] [ Select ]

Commit Records/Requests

[ Skip data entry validation; No dialog; Force Commit ]

Loop

Duplicate Record/Request

Insert Calculated Result [ QuoteItems::QTY; 1 ] [ Select ]

Insert Calculated Result [ QuoteItems::QTY_Count; $QTY_Count-1 ] [ Select ]

Set Variable [ $QTY_Count; Value:QuoteItems::QTY_Count ] Commit Records/Requests

[ Skip data entry validation; No dialog ] Exit Loop If [ QuoteItems::QTY_Count = 1 ]

End Loop End Loop 

Edited by Oyseka
Wrong screenshot denoted
Link to comment
Share on other sites

This topic is 2595 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.