Hi Experts,
Need your help in understanding how to get the value of 'email_config' input parameter which is mandatory in "/Mail POST" API.
We couldn't find a way to get the value of 'email_config'.
Thanks,
Venkat
Hi Experts,
Need your help in understanding how to get the value of 'email_config' input parameter which is mandatory in "/Mail POST" API.
We couldn't find a way to get the value of 'email_config'.
Thanks,
Venkat
You have to call a GET on the endpoint OutboundEmailConfiguration/list and the ID will be in the result. For example, using sidecar you can call it like this:
App.api.call('get', App.api.buildURL('OutboundEmailConfiguration/list'), null, {success: function (result) {
var emailConfig = result[0].id;
}});
Hi Venkat,
You can check email_config IDs for your system from `outbound_email` table in your DB.
SELECT * FROM `outbound_email` where `name` = 'system' AND (`type` = 'system-override' OR `type` = 'system')
By running following SQL above you can reach these records. You would need to use `id` fields of them.
This way you would be able to send and create the records.
Hope this helps.
Best Regards
Tevfik Tümer
Developer Support Engineer
Hi Alan,
Thanks a lot for quick response !!
Request you to also help in understand what is "teams" input parameter and how do I get the primary and other teams IDs.
Regards,
Venakt
Hi Venkat,
If you only want to assign the email to the primary (or Global) team for visibility for everyone, you can just fill it in with the parameter {"primary": "1"}. This is if you don't use team management much (I'd suggest you double check the Global team has the ID 1 using the method below - but it is the default value, so this should work in 95% of cases).
If you want to assign it to a specific team, then I'd suggest you navigate to <yoursugarinstance>/#bwc/index.php?module=Teams&action=index. Then you can click into the team that you want to assign it to. The URL should look something like <yoursugarinstance>/#bwc/index.php?module=Teams&offset=8&stamp=1474280064091945400&return_module=Teams&action=DetailView&record=6c73a4a9-9226-166f-6290-5762b20d06b5. The last bit - 6c73a4a9-9226-166f-6290-5762b20d06b5 - is the ID of the team. So you can assign it to "teams": { "primary": " 6c73a4a9-9226-166f-6290-5762b20d06b5", "others": [ "9d9df8cc-1c6d-2cf9-77a1-577fbcd3fc1c" ] }.