[Shopify] Address broken after Dynamic Link

The Shopify connector app hasn’t been working for me since the update. I’m working on a pull request to fix it, but I need to figure out how to set up a dynamic link from the get_doc function. The old code is as follows:

                        frappe.get_doc({
                                "doctype": "Address",
                                "shopify_address_id": address.get("id"),
                                "address_title": address_title,
                                "address_type": address_type,
                                "address_line1": address.get("address1") or "Address 1",
                                "address_line2": address.get("address2"),
                                "city": address.get("city") or "City",
                                "state": address.get("province"),
                                "pincode": address.get("zip"),
                                "country": address.get("country"),
                                "phone": address.get("phone"),
                                "email_id": shopify_customer.get("email"),
                                "customer": customer.name,  # This line and the next line need to be changed
                                "customer_name":  customer.customer_name # into dynamic links
                        }).insert()

@saurabh6790 can you look into this?

@Emmett_Raymond Sorry for the issue.

Fixing via [fix] add customers dynamic link to address while syncing customer from Shopify by saurabh6790 · Pull Request #147 · frappe/erpnext_shopify · GitHub

Thanks for fixing Shopify. So, what I’m getting from your code, there’s no ‘frappe’ way to add dynamic links yet, just direct SQL?

I’d love to see a safer function added to frappe itself that didn’t involve string injection.