Hi Forum,
Being new to the CRM serve side code development, I have a few questions about how CRM web service works.
I notice in plenty of web examples that some people use IorganizationService and some use IorganizationServiceproxy.
What's the difference or Pro/Cons of using either of these ? Currently I am using it without proper understanding.
Secondly, my first task on CRM platform is to create some records using script component of SSIS tool. We have MS SQL database which has some leads generated from another software. My task is to create the same leads in CRM using SSIS by scheduling package.
I researched a bit online and found few blogs to help me out so that part is covered but I still don't know how to generate dynamic server URL in my C# package code. At the moment I am using below code snippet.
serviceproxy = new OrganizationServiceProxy(
new Uri("http://OurCRMServer/OurOrgname/XRMServices/2011/Organization.svc"), null, credentials, null)
How can I get server URL and user credentials dynamically. Like in client side using JavaScript, I can use getClientUrl() function. Is there any equivalent in server side ?
Hope my questions makes sense? Otherwise pardon my newbie knowledge :)
Initially I am using this in SSIS script component but later I might have to use in plugin and custom workflows. Unfortunately, app.config which I initially planned to store this information doesn't work. I get null values in my code when I read it from
app.config.
We are on CRM 2011 on premise.
Regards,
JB