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

Notifications

Announcements

No record found.

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 76
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,105 Moderator on at
  • Revathi.T Profile Picture
    76 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans