Désolé mais j'ai pas bien compris le rapport entre le numéro de pièce et l'interface IBODocumentPartLigne3
Si tu veux savoir comment mettre un numéro de pièce voici un exemple trés rapide.
- Code: Tout sélectionner
Dim BonDeCommande As IBODocumentVente2= Nothing
BonDeCommande = BaseCommercial.FactoryDocumentVente.CreateType(DocumentType.DocumentTypeVenteCommande)
BonDeCommande.SetDefaultClient(BaseCommercial.CptaApplication.FactoryClient.ReadNumero("UnCt_NumClient")
BonDeCommande.DO_Date = UneDATE
BonDeCommande.DO_Ref = UneREF
BonDeCommande.SetDefaultDO_Piece() 'va cherche le prochain numéro en fonction du type
BonDeCommande.Write() ' ou WriteDefault
Si c'est pas ça précise ta question
ps : je dev en vb.net et V2 objet métier