copy dimension value from a company to another company

gazpacho
Member Posts: 48
Hello,
I want to copy the value of Global Dimension 1 of a contact in company A to a contact in company B. When I assign them with
RecContactCompanyB."Global Dimension 1 Code" := RecContactCompanyA."Global Dimension 1 Code"
it does not work. The field in RecContactCompanyB remains empty. What am I doing wrong ?
Best regards
Josh R.
I want to copy the value of Global Dimension 1 of a contact in company A to a contact in company B. When I assign them with
RecContactCompanyB."Global Dimension 1 Code" := RecContactCompanyA."Global Dimension 1 Code"
it does not work. The field in RecContactCompanyB remains empty. What am I doing wrong ?
Best regards
Josh R.
0
Comments
-
Call MODIFY.0
-
Ok, sorry if I was not clear. Of course I call MODIFY after this. But it still remains empty.0
-
Please post more code, looking at what you have provided we cannot help you.0
-
RecContactCompanyB.CHANGECOMPANY(‘Company B’);
IF NOT(RecContactCompanyB.GET(RecContactCompanyA." No.")) THEN
EXIT
ELSE BEGIN
RecContactCompanyB."Global Dimension 1 Code" := RecContactCompanyA."Global Dimension 1 Code";
RecContactcompanyB.MODIFY;
END;0 -
Maybe RecContactCompanyA.GET is missing.0
-
I checked it; RecContactCompanyA is not empty.0
-
gazpacho wrote:RecContactCompanyB.CHANGECOMPANY(‘Company B’);
IF NOT(RecContactCompanyB.GET(RecContactCompanyA." No.")) THEN
EXIT
ELSE BEGIN
RecContactCompanyB."Global Dimension 1 Code" := RecContactCompanyA."Global Dimension 1 Code";
RecContactcompanyB.MODIFY;
END;
If you change the "EXIT" with an "ERROR('No record found');", and you get the error, it means you didn't find a record.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Or remove the IF condition and receive a runtime error0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions