web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Custom field integration between BC and CRM

(1) ShareShare
ReportReport
Posted on by 84
Hi,
      I'm trying to create Custom field /Order Type/ in sales order page for BC-CRM Integration. created custom fields in both BC and CRM and run alproxy generator and wrote a code like this. I couldn't able to achieve mapping. where I'm missing things? Could you please assist me to build custom field integration?

tableextension 50143 OrderExt extends /CRM Salesorder/

Description = 'Quote that has been accepted.'; 
fields 

field(10142; /Order Type/; Option) 

ExternalName = 'ordertype'; 
ExternalType = 'Picklist'; 
Description = ''; 
Caption = 'Order Type'; 
InitValue = / /; 
OptionMembers = / /,/Fixed Bid/,/Time & Material/;
OptionOrdinalValues = -1, 1, 2;

}
}

pageextension 50142 /CRM Sales Order Page Extn/ extends /CRM Sales Order List/ 

layout 

addafter(Name) 

field(/Order Type/; Rec./Order Type/) 

ApplicationArea = All;



} 

pageextension 50140 /Sales Order Type Page Ext/ extends /Sales Order/ 

layout 

addafter(/External Document No./) 

field(/Order Type/; Rec./Order Type/) 

Caption = 'Order Type'; 
ApplicationArea = All; 
 

codeunit 50149 /Order Type custom field int/ 

[EventSubscriber(ObjectType::Codeunit, Codeunit::/CRM Setup Defaults/, 'OnBeforeResetSalesOrderMapping', '', false, false)] 

local procedure OTOnBeforeResetBidirectionalSalesOrderMapping(IntegrationTableMappingName: Code[20]) 

var 

IntegrationFieldMapping: Record /Integration Field Mapping/; 

Salesheader: Record /Sales Header/; 

CRMsalesOrder: Record /CRM Salesorder/; 

begin 

IntegrationFieldMapping.CreateRecord(IntegrationTableMappingName, Salesheader.FieldNo(/Order Type/), CRMsalesOrder.FieldNo(/Order Type/), IntegrationFieldMapping.Direction::ToIntegrationTable, '', true, false); 

end;

}

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,165 Moderator on at
  • Revathi.T Profile Picture
    84 on at
    @Inge M. Bruvik Yes I referred the above link. In addition to that, I also referred this video, https://www.youtube.com/watch?v=6NUiLi4pUR4. Now i can able to get data from CRM to BC staging table. Now I cannot able to get data from staging table to BC sales order page. I cannot see my custom fields in Integration field mapping of salesorder-order row in Integration table mapping page of BC  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans