Eship/Email Setup

Savatage
Member Posts: 7,142
Using the email feature that came with Eship is great. But I (and I guess everyone else) really just used it (if you even did) for sending invoices or confirmations or whatever.
Today I've been toying with send PO's using this method - yes PDF is easier (anyway) As far as it working for Vendors-IT DOESN't
See code
The part in questions is CASE Type OF
Type::Customer: in get emailrule.
It's never going to run the "Vendor" code cause this TYPE is nowhere to be found. It's not pulling this info from anywhere & if it was Ship-to's? Sorry my Ship-To Address Table doesn't even support Vendors.
Anybody else try this?
Today I've been toying with send PO's using this method - yes PDF is easier (anyway) As far as it working for Vendors-IT DOESN't
See code
OnDelete() EMailCommentLine.RESET; EMailCommentLine.SETRANGE("Table ID",DATABASE::"E-Mail Attachment"); EMailCommentLine.SETRANGE(Code,Code); EMailCommentLine.DELETEALL; LookupComment() EMailCommentLine.RESET; EMailCommentLine.SETRANGE("Table ID",DATABASE::"E-Mail Attachment"); EMailCommentLine.SETRANGE(Code,Code); CLEAR(EMailComment); EMailComment.SETTABLEVIEW(EMailCommentLine); EMailComment.RUNMODAL; GetEMailRule(Type : 'Customer,Vendor';No : Code[20];ShipToCode : Code[20]) : Boolean CASE Type OF Type::Customer: BEGIN IF ShipToCode <> '' THEN BEGIN ShipToAddress.GET(No,ShipToCode); SendMail := GET(ShipToAddress."E-Mail Rule Code"); IF NOT SendMail THEN BEGIN Customer.GET(No); IF Customer."Use E-Mail Rule for ShipToAddr" THEN SendMail := GET(Customer."E-Mail Rule Code"); END; END ELSE BEGIN Customer.GET(No); SendMail := GET(Customer."E-Mail Rule Code"); END; END; Type::Vendor: BEGIN IF ShipToCode <> '' THEN BEGIN OrderAddress.GET(No,ShipToCode); SendMail := GET(OrderAddress."E-Mail Rule Code"); IF NOT SendMail THEN BEGIN Vendor.GET(No); IF Vendor."Use E-Mail Rule for Order Addr" THEN SendMail := GET(Vendor."E-Mail Rule Code"); END; END ELSE BEGIN Vendor.GET(No); SendMail := GET(Vendor."E-Mail Rule Code"); END; END; END; IF NOT SendMail THEN BEGIN EMailSetup.GET; SendMail := GET(EMailSetup."Default E-Mail Rule"); END; EXIT(SendMail);
The part in questions is CASE Type OF
Type::Customer: in get emailrule.
It's never going to run the "Vendor" code cause this TYPE is nowhere to be found. It's not pulling this info from anywhere & if it was Ship-to's? Sorry my Ship-To Address Table doesn't even support Vendors.
Anybody else try this?
0
Comments
-
Hi Harry,
I don;t understand what you mean with TYPE.
If this is compiling C/AL code, the type vendor should exist, otherwise you get a compile error.
As for the ship-to address, if you read the code, it should use orderadress for vendors, not ship-to address. You can read in the variables what table this is.
If there is no documentation available about how to use this for vendors you can use a rough reversed engineering method. Delete this function and compile all objects. Then every point that reffers to this function will not compile :-s
Off course you need to do this in a copy of the database that you can discard after this action.
Good luck!0
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