Skip to main content
Post a question

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Custom field integration between BC and CRM

Posted on 1 Nov 2023 09:32:24 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;

}

  • Revathi.T Profile Picture
    Revathi.T 76 on 06 Nov 2023 at 11:26:59
    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,748 Super User 2024 Season 1 on 05 Nov 2023 at 14:35:30

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans