Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Field Service Integration] Additional synchronization entities #27250

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
48b9d78
added: additional field service integration type
plakna Aug 27, 2024
66d9f9c
added: navigation actions for invalid no series message
plakna Aug 28, 2024
0f64dc7
added: missing setup checks
plakna Aug 28, 2024
395245f
added: mandatory flag (depends on setup)
plakna Aug 28, 2024
83eacc4
added: service order sync trigger - via service (item) line
plakna Aug 29, 2024
865ee28
added: auto archive on delete service (item) line
plakna Aug 29, 2024
01b63fa
added: sync without service item no.
plakna Aug 29, 2024
d9e602f
added: support of archived services orders (update posted quantities)
plakna Sep 4, 2024
52deb44
added: support of job plan line reversal
plakna Sep 5, 2024
e30acae
added: default value for integrate to service (service order type)
plakna Sep 5, 2024
24baad5
added: bookable resource bookings sync
plakna Sep 5, 2024
05d02fc
added: use max value and resync estimated qty if not used only
plakna Sep 6, 2024
2da075d
added: coupled to field service flag
plakna Sep 6, 2024
7e759c2
added: auto enable service order archive
plakna Sep 6, 2024
032b137
modified: editable of setup fields (wizard and setup card)
plakna Sep 9, 2024
c4bd193
added: posted service invoice api
plakna Sep 10, 2024
29fca4e
added: bidirectional service item description sync
plakna Sep 11, 2024
38d8543
fixed: datetime to date conversation issue
plakna Sep 11, 2024
208d734
added: quantity/duration shipped sync
plakna Sep 11, 2024
fa4fe56
fixed: sync of bookable resource bookings
plakna Sep 11, 2024
19619d9
fixed: missing modification trigger
plakna Sep 11, 2024
4c3cde7
fixed: sync of bookable resource bookings
plakna Sep 11, 2024
52026af
Merge branch 'main' into main
plakna Sep 16, 2024
6930b16
fixed: object no conflicts
plakna Sep 16, 2024
adaf4f2
added: crm redirect event subscriber
plakna Sep 17, 2024
8756702
added: unit tests
plakna Sep 17, 2024
6b2aacd
added: only sync work order product/service if IntegrateToService=false
plakna Sep 12, 2024
bc8ad1e
added: company id
plakna Sep 26, 2024
8e32a89
fixed: typo
plakna Oct 1, 2024
406e185
added: redirect to archive for "show in bc button"
plakna Oct 1, 2024
df1be68
fixed: explicit call of service item sync
plakna Oct 3, 2024
ce80929
fixed: optional location code
plakna Oct 3, 2024
220e074
removed: product id on work order service (only necessaryfor product)
plakna Oct 3, 2024
dd91a3c
added: separate service item line for bookings
plakna Oct 3, 2024
c5fd58e
added: skip reimport for sales (item) lines
plakna Oct 3, 2024
458d48e
added: status sync
plakna Oct 4, 2024
480f543
modified: object id of archived service order job
plakna Oct 4, 2024
9f56808
removed: unnecessary namespace usings
plakna Oct 7, 2024
5b37b92
fixed: product id label
plakna Oct 16, 2024
8853f1a
fixed: missing objects in permissionset files
plakna Oct 16, 2024
d1c72e0
fixed: sync of service item line / work order incident
plakna Oct 16, 2024
26dec3f
added: filled service item line no test
plakna Oct 20, 2024
03e5828
added: reset of qty to ship/invoice/consume fields
plakna Oct 20, 2024
575119a
added: auto sync of uncoupled work orders (on open page)
plakna Oct 21, 2024
3a11be6
removed: resync of pending state
plakna Oct 21, 2024
d1bc26c
added: skip work orders without incidents
plakna Oct 21, 2024
b957eec
added: support of min qty
plakna Oct 24, 2024
7294528
updated: unit tests
plakna Oct 24, 2024
b621466
added: explicit validation of customer related fields
plakna Oct 24, 2024
8f18274
Merge branch 'main' into main
plakna Nov 6, 2024
d603527
added: paid status in posted service invoice api
plakna Nov 6, 2024
a14eb13
Merge branch 'main' into main
JesperSchulz Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added: posted service invoice api
  • Loading branch information
plakna committed Sep 12, 2024
commit c4bd1934e35376c2e561a5676e36b538fe07e713
10 changes: 8 additions & 2 deletions Apps/W1/FieldServiceIntegration/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
"contextSensitiveHelpUrl": "https://learn.microsoft.com/dynamics365/business-central/",
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"logo": "ExtensionLogo.png",
"dependencies": [
"dependencies": [

],
{
"id": "10cb69d9-bc8a-4d27-970a-9e110e9db2a5",
"name": "_Exclude_APIV2_",
"publisher": "Microsoft",
"version": "25.0.0.0"
}
],
"internalsVisibleTo": [
{
"id": "41b3ab6e-3f20-47c7-a67f-feccc4d58a55",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Integration.DynamicsFieldService;

using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Location;
using Microsoft.Foundation.UOM;
using Microsoft.Service.History;
using Microsoft.API.V2;

page 6617 "FS Posted Serv. Inv. Lines API"
{
APIVersion = 'v2.0';
EntityCaption = 'Posted Service Invoice Line';
EntitySetCaption = 'Posted Service Invoice Lines';
PageType = API;
ODataKeyFields = SystemId;
EntityName = 'postedServiceInvoiceLine';
EntitySetName = 'postedServiceInvoiceLines';
SourceTable = "Service Invoice Line";
InsertAllowed = false;
ModifyAllowed = false;
DeleteAllowed = false;
Extensible = false;

layout
{
area(content)
{
repeater(Group)
{
field(id; Rec.SystemId)
{
Caption = 'Id';
Editable = false;
}
field(documentId; ServiceInvoiceHeader.SystemId)
{
Caption = 'Document Id';
}
field(sequence; Rec."Line No.")
{
Caption = 'Sequence';
}
field(itemId; Item.SystemId)
{
Caption = 'Item Id';
}
field(accountId; GLAccount.SystemId)
{
Caption = 'Account Id';
}
field(lineType; Rec.Type)
{
Caption = 'Line Type';
}
field(lineObjectNumber; Rec."No.")
{
Caption = 'Line Object No.';
}
field(description; Rec.Description)
{
Caption = 'Description';
}
field(description2; Rec."Description 2")
{
Caption = 'Description 2';
}
field(unitOfMeasureId; UnitOfMeasure.SystemId)
{
Caption = 'Unit Of Measure Id';
}
field(unitOfMeasureCode; Rec."Unit of Measure Code")
{
Caption = 'Unit Of Measure Code';
}
field(quantity; Rec.Quantity)
{
Caption = 'Quantity';
}
field(unitPrice; Rec."Unit Price")
{
Caption = 'Unit Price';
}
field(discountAmount; Rec."Line Discount Amount")
{
Caption = 'Discount Amount';
}
field(discountPercent; Rec."Line Discount %")
{
Caption = 'Discount Percent';
}
field(discountAppliedBeforeTax; Rec."Line Discount Amount")
{
Caption = 'Discount Applied Before Tax';
Editable = false;
}
field(amountExcludingTax; Rec."Line Amount")
{
Caption = 'Amount Excluding Tax';
Editable = false;
}
field(taxCode; Rec."VAT %")
{
Caption = 'Tax Code';
}
field(taxPercent; Rec."VAT %")
{
Caption = 'Tax Percent';
Editable = false;
}
field(amountIncludingTax; Rec."Amount Including VAT")
{
Caption = 'Amount Including Tax';
Editable = false;
}
field(netAmount; Rec.Amount)
{
Caption = 'Net Amount';
Editable = false;
}
field(netAmountIncludingTax; Rec."Amount Including VAT")
{
Caption = 'Net Amount Including Tax';
Editable = false;
}
field(itemVariantId; ItemVariant.SystemId)
{
Caption = 'Item Variant Id';
}
field(locationId; Location.SystemId)
{
Caption = 'Location Id';
}
part(dimensionSetLines; "APIV2 - Dimension Set Lines")
{
Caption = 'Dimension Set Lines';
EntityName = 'dimensionSetLine';
EntitySetName = 'dimensionSetLines';
SubPageLink = "Parent Id" = field(SystemId);
}
}
}
}

trigger OnAfterGetRecord()
begin
if not ServiceInvoiceHeader.Get(Rec."Document No.") then
clear(ServiceInvoiceHeader);

Clear(Item);
Clear(GLAccount);
case Rec.Type of
Rec.Type::Item:
if not Item.Get(Rec."No.") then
Clear(Item);
Rec.Type::"G/L Account":
if not GLAccount.Get(Rec."No.") then
Clear(GLAccount);
end;

if not UnitOfMeasure.Get(Rec."Unit of Measure Code") then
Clear(UnitOfMeasure);
if not Location.Get(Rec."Location Code") then
Clear(Location);
if not ItemVariant.Get(Item."No.", Rec."Variant Code") then
Clear(ItemVariant);
end;

var
ServiceInvoiceHeader: Record "Service Invoice Header";
Item: Record Item;
GLAccount: Record "G/L Account";
UnitOfMeasure: Record "Unit of Measure";
ItemVariant: Record "Item Variant";
Location: Record Location;
}
Loading