Table of Contents

Codeunit "Items Selection Mgt WCAP"

ID 70345413
Namespace: CapVision.CapCollecte.Missions.MissionRequest

Properties

Name Value
SingleInstance True
Access Public

Methods

LoadCustomerRecords

Va appliquer les filtres sur les lignes de prix de vente associées au client ou à son groupe de prix. Si on trouve une ligne qui n'existe pas déjà dans la table "Items Selection", on l'ajoute.

procedure LoadCustomerRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10]; SearchInAllCompanies: Boolean; SearchInPriceGroups: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

La table temporaire que l'on va remplir avec les lignes de prix trouvées

CustomerNo Code[20]

Le n° de client pour lequel on recherche ses prix

ShiptoCode Code[10]

Le code adresse pour lequel on recherche ses prix. Peut être vide

SearchInAllCompanies Boolean

Spécifie si on cherche les lignes de prix dans toutes les sociétés ou seulement la société courante

SearchInPriceGroups Boolean

Spécifie si on cherche aussi les lignes de prix dans le groupe de prix du client

SetJobProductLineFilters

Applique les filtres sur les lignes produit affaire pour un client et un code adresse donnés.

procedure SetJobProductLineFilters(var JobProductLine: Record "Job Product Line WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10])

Parameters

Name Type Description
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"

La ligne de produit affaire sur laquelle appliquer les filtres

CustomerNo Code[20]

Le n° du client pour lequel on veut récupérer ses lignes de contrats

ShiptoCode Code[10]

Le code adresse du client. Il peut être vide.

CreateFromJobProductLine

Va parcourir les lignes de produit affaire filtrées et les ajouter dans la table "Items Selection" si elles n'existent pas déjà. On cherche soit les lignes de produits, soit les lignes de prestations générales (associées à aucun produit). En fonction du paramètre "SearchInAllCompanies", on va chercher les lignes dans toutes les sociétés ou seulement la société courante.

procedure CreateFromJobProductLine(var ItemsSelection: Record "Items Selection WCAP"; var JobProductLine: Record "Job Product Line WCAP"; var EntryNo: Integer; SearchInAllCompanies: Boolean): Boolean

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

La table temporaire que l'on va remplir avec les lignes de produit affaire trouvées

JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"

Les lignes de produit affaire pré-filtrées depuis lesquelles on va renseigner les enregistrements de ItemsSelection

EntryNo Integer

Le numéro de ligne à utiliser pour les nouvelles lignes

SearchInAllCompanies Boolean

Spécifie si on cherche les lignes de produit affaire dans toutes les sociétés ou seulement la société courante

Returns

Type Description
Boolean

CheckIfLinesFromMultipleCompanyUsed

Vérifie si les lignes sélectionnées depuis la page de sélection des articles proviennent de la même société.

procedure CheckIfLinesFromMultipleCompanyUsed(var ItemsSelection: Record "Items Selection WCAP"; var SelectedCompany: Text)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

L'ensemble des enregistrements temporaires affichées sur la page

SelectedCompany Text

La société que l'on récupère depuis les enregistrements sélectionnés

CreateMissionFromItemsSelection

Créer des missions depuis l'enregistrement sélection des articles et le client / site donné en paramètre.

procedure CreateMissionFromItemsSelection(var TempItemsSelection: Record "Items Selection WCAP" temporary; CustomerNo: Code[20]; ShiptoCode: Code[10]; SelectedCompany: Text): List of [Code[20]]

Parameters

Name Type Description
TempItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
CustomerNo Code[20]
ShiptoCode Code[10]
SelectedCompany Text

Returns

Type Description
List of [Code[20]]

CreateOrderToCreate

Cette procédure va créer une commande de vente à créer à partir des lignes sélectionnées dans la page de sélection des articles. Elle va créer une session dans la société de destination pour y créer la commande de vente.

procedure CreateOrderToCreate(var TempItemsSelection: Record "Items Selection WCAP" temporary; CustomerNo: Code[20]; ShiptoCode: Code[10]; SelectedCompany: Text)

Parameters

Name Type Description
TempItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
CustomerNo Code[20]
ShiptoCode Code[10]
SelectedCompany Text

GetAddressName

Obsolete

This element will become obsolete from version V27.202605. This procedure is obsolete since the contracts are based on the standard Job module.

[Obsolete(This procedure is obsolete since the contracts are based on the standard Job module.,V27.202605)]
procedure GetAddressName(PriceListCode: Code[20]; var OutletDescription: Text[250]; var OutletType: Enum "Outlet Type WCAP"; CompanyName: Text[30]): Text[100]

Parameters

Name Type Description
PriceListCode Code[20]
OutletDescription Text[250]
OutletType Enum CapVision.CapCollecte.Missions.MissionRequest."Outlet Type WCAP"
CompanyName Text[30]

Returns

Type Description
Text[100]

CreateFromPriceListLine

Obsolete

This element will become obsolete from version V27.202601. Use CreateFromJobProductLine instead since the contracts are based on the standard Job module.

[Obsolete(Use CreateFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
procedure CreateFromPriceListLine(var ItemsSelection: Record "Items Selection WCAP"; var PriceListLine: Record "Price List Line"; var EntryNo: Integer; SearchInAllCompanies: Boolean): Boolean

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
EntryNo Integer
SearchInAllCompanies Boolean

Returns

Type Description
Boolean

LoadCustomerRecords

Obsolete

This element will become obsolete from version V25.202505. Use LoadCustomerRecords with SearchInPriceGroups instead

[Obsolete(Use LoadCustomerRecords with SearchInPriceGroups instead,V25.202505)]
procedure LoadCustomerRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10]; SearchInAllCompanies: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
CustomerNo Code[20]
ShiptoCode Code[10]
SearchInAllCompanies Boolean

SetSalesPriceListLineFilters

Obsolete

This element will become obsolete from version V27.202601. Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.

[Obsolete(Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.,V27.202601)]
procedure SetSalesPriceListLineFilters(var PriceListLine: Record "Price List Line"; CustomerNo: Code[20]; ShiptoCode: Code[10])

Parameters

Name Type Description
PriceListLine Record "Price List Line"
CustomerNo Code[20]
ShiptoCode Code[10]

SetPurchPriceListLineFilters

Obsolete

This element will become obsolete from version V27.202601. Not used anymore since the contracts are based on the standard Job module.

[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202601)]
procedure SetPurchPriceListLineFilters(var PriceListLine: Record "Price List Line"; VendorNo: Code[20]; OrderAddressCode: Code[10])

Parameters

Name Type Description
PriceListLine Record "Price List Line"
VendorNo Code[20]
OrderAddressCode Code[10]

CreateBusinessServiceFromPriceListLine

Obsolete

This element will become obsolete from version V27.202601. Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.

[Obsolete(Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
procedure CreateBusinessServiceFromPriceListLine(var TempPriceListLine: Record "Price List Line" temporary; var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
TempPriceListLine Record "Price List Line" temporary
PriceListLine Record "Price List Line"

LoadGeneralRecords

Obsolete

This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.

[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure LoadGeneralRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; SearchInAllCompanies: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
CustomerNo Code[20]
SearchInAllCompanies Boolean

SetSalesGeneralPriceListLineFilters

Obsolete

This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.

[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure SetSalesGeneralPriceListLineFilters(var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
PriceListLine Record "Price List Line"

SetSalesPriceListLineFilter

Obsolete

This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.

[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure SetSalesPriceListLineFilter(var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
PriceListLine Record "Price List Line"

Events

OnAfterCreateSalesLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateSalesLine(var SalesLine: Record "Sales Line"; ItemsSelection: Record "Items Selection WCAP")

Parameters

Name Type Description
SalesLine Record "Sales Line"
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

OnAfterCreateSalesServiceLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateSalesServiceLine(var SalesLine: Record "Sales Line"; ItemsSelection: Record "Items Selection WCAP")

Parameters

Name Type Description
SalesLine Record "Sales Line"
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

OnLoadVendorRecordsOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnLoadVendorRecordsOnAfterSetFilters(var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
PriceListLine Record "Price List Line"

OnAfterSetJobProductLineFilters

[IntegrationEvent(False,False)]
local procedure OnAfterSetJobProductLineFilters(var JobProductLine: Record "Job Product Line WCAP")

Parameters

Name Type Description
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"

OnAfterInsertItemsSelectionLine

[IntegrationEvent(False,False)]
local procedure OnAfterInsertItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP"; var EntryNo: Integer; Company: Record Company)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"
EntryNo Integer
Company Record Company

OnItemSelectionLineAlreadyExistsOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"
RecordCompany Text[30]
AlreadyExists Boolean
IsHandled Boolean

OnPriceListItemSelectionLineAlreadyExistsOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnPriceListItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
RecordCompany Text[30]
AlreadyExists Boolean
IsHandled Boolean

OnBeforeCreateItemsSelectionLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP")

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"

OnBeforeCreatePriceListItemsSelectionLine

[IntegrationEvent(False,False)]
local procedure OnBeforeCreatePriceListItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"

OnCreateBusinessServiceOnFilterJobServiceLine

[IntegrationEvent(False,False)]
local procedure OnCreateBusinessServiceOnFilterJobServiceLine(var JobServiceLine: Record "Job Service Line WCAP")

Parameters

Name Type Description
JobServiceLine Table CapVision.CapCollecte.Job."Job Service Line WCAP"

OnAfterCreateMissionFromJobProductLine

[IntegrationEvent(False,False)]
local procedure OnAfterCreateMissionFromJobProductLine(var Mission: Record "Mission WCAP"; JobProductLine: Record "Job Product Line WCAP"; var TempItemsSelection: Record "Items Selection WCAP" temporary)

Parameters

Name Type Description
Mission Table CapVision.CapCollecte.Missions."Mission WCAP"
JobProductLine Table CapVision.CapCollecte.Job."Job Product Line WCAP"
TempItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

OnLoadCustomerRecordsOnAfterSetFilters

Obsolete

This element will become obsolete from version V27.202601. Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.

[IntegrationEvent(False,False)]
[Obsolete(Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.,V27.202601)]
local procedure OnLoadCustomerRecordsOnAfterSetFilters(var PriceListLine: Record "Price List Line")

Parameters

Name Type Description
PriceListLine Record "Price List Line"

OnAfterCreateItemsSelectionLine

Obsolete

This element will become obsolete from version V27.202601. Not used anymore.

[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnAfterCreateItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; var EntryNo: Integer; Company: Record Company)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
EntryNo Integer
Company Record Company

OnAfterCreateItemsSelectionServiceLine

Obsolete

This element will become obsolete from version V27.202601. Not used anymore.

[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnAfterCreateItemsSelectionServiceLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; var EntryNo: Integer; Company: Record Company)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
EntryNo Integer
Company Record Company

OnCheckItemSelectionLineAlreadyExistsOnAfterSetFilters

Obsolete

This element will become obsolete from version V27.202601. Replaced by OnItemSelectionLineAlreadyExistsOnAfterSetFilters with JobProductLine.

[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnItemSelectionLineAlreadyExistsOnAfterSetFilters with JobProductLine.,V27.202601)]
local procedure OnCheckItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
RecordCompany Text[30]
AlreadyExists Boolean
IsHandled Boolean

OnCheckItemSelectionServiceLineAlreadyExistsOnAfterSetFilters

Obsolete

This element will become obsolete from version V27.202601. Not used anymore.

[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnCheckItemSelectionServiceLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"
RecordCompany Text[30]
AlreadyExists Boolean
IsHandled Boolean

OnLoadCustomerRecordsOnBeforeCheckCustomerPriceGroup

Obsolete

This element will become obsolete from version V27.202601. Not used anymore.

[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnLoadCustomerRecordsOnBeforeCheckCustomerPriceGroup(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; var IsHandled: Boolean)

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
CustomerNo Code[20]
IsHandled Boolean

OnBeforeInsertItemsSelectionLine

Obsolete

This element will become obsolete from version V27.202601. Replaced by OnBeforeCreateItemsSelectionLine with JobProductLine.

[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnBeforeCreateItemsSelectionLine with JobProductLine.,V27.202601)]
local procedure OnBeforeInsertItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"

OnBeforeInsertItemsSelectionServiceLine

Obsolete

This element will become obsolete from version V27.202601. Not used anymore.

[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnBeforeInsertItemsSelectionServiceLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")

Parameters

Name Type Description
ItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"
PriceListLine Record "Price List Line"

OnFilterServicePriceListLine

Obsolete

This element will become obsolete from version V27.202601. Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.

[IntegrationEvent(False,False)]
[Obsolete(Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
local procedure OnFilterServicePriceListLine(var ServicePriceListLine: Record "Price List Line")

Parameters

Name Type Description
ServicePriceListLine Record "Price List Line"

OnAfterCreateMissionFromPickupContractLine

Obsolete

This element will become obsolete from version V27.202601. Replaced by OnAfterCreateMissionFromJobProductLine with JobProductLine.

[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnAfterCreateMissionFromJobProductLine with JobProductLine.,V27.202601)]
local procedure OnAfterCreateMissionFromPickupContractLine(var Mission: Record "Mission WCAP"; PickupContractLine: Record "Pickup Contract Line WCAP"; var TempItemsSelection: Record "Items Selection WCAP" temporary)

Parameters

Name Type Description
Mission Table CapVision.CapCollecte.Missions."Mission WCAP"
PickupContractLine Table CapVision.CapCollecte.Contracts."Pickup Contract Line WCAP"
TempItemsSelection Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP"

See also