Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Custom field integration between BC and CRM

Posted on by 70
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;

}

  • Revathi.T Profile Picture
    Revathi.T 70 on at
    Custom field integration between BC and CRM
    @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  
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans