• LBJ
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi

Is it possible to write a formula that essentially breaks the shipping address down into the individual lines?

We have an external system that needs to receive the address fields for a child object to an Account in three separate fields.

I figure if I can identify a new line character, then this should be pretty straight forward, but I can't figure out how to do this.
Any ideas?

thanks
Nick

Hello everyone.

I was hoping someone out there may have come accross a solution to an issue I am currently having.

I have a winform project that I am moving over to a CLR stored procedure that will automatically update

Contacts on salesforce when changes are made to our db. The initial development for the winform was

easy enough to create but once I put it into a CLR project the web reference presents problems.

It builds, compiles and deploys fine but throws an error when I try to run it from SSMS. After

researching out the error below I serialized the .dll using sgen.exe from the command line and

successfull created and added the foo.xmlserializers.dll file to the project, I added the pre and post

deployment scripts necessary to add and drop the serialization assembly and am still recieving

the same error after I deploy the project.

If you recognize the method and the error and have a possible solution for me the help would be greatly

appreciated. It is for .net 2.0 and sqlserver 2005.

 

The error:

Msg 6522, Level 16, State 1, Procedure SynchronizeSalesforceContactDetails, Line 0

A .NET Framework error occurred during execution of user-defined routine or aggregate "SynchronizeSalesforceContactDetails":

System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. ---> System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

System.IO.FileLoadException:

at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)

at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)

at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)

at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, St

...

System.InvalidOperationException:

at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)

at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)

at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)

at System.Web.Services.Protocols.SoapClientType..ctor(Type type)

at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

at salesforceContactUpdate.ForceWebReference.SforceService..ctor()

at salesforceContactUpdate.UserDefinedFunctions.SynchronizeSalesforceCo...

  • February 03, 2010
  • Like
  • 0

I am able to login to salesforce.com using .NET.

The problem is using any of the standard objects.

 

I am unable to contruct a Contact or Account object.

I am guessing I need to add the Service Reference?

Not sure how to do that, since I'm still new to .NET 

for salesforce.com

 

Here is my code, sorry code insert does not work!!!:

 

 static void Main(string[] args)
        {

            string userName = "username";
            string password = "password";
            string soql = "select LastName,FirstName,TaxID__c from Contact";

            SforceService SfdcBinding = null;
            LoginResult CurrentLoginResult = null;
            SfdcBinding = new SforceService();
            try
            {
                //login
                CurrentLoginResult = SfdcBinding.login(userName, password);
                //reset the SOAP endpoint.
                SfdcBinding.Url = CurrentLoginResult.serverUrl;
                //set the session id into the binding
                SfdcBinding.SessionHeaderValue = new SessionHeader();
                SfdcBinding.SessionHeaderValue.sessionId = CurrentLoginResult.sessionId;
               
               
                Console.WriteLine("{0}",CurrentLoginResult.sessionId);

                QueryResult queryResult = null;

                queryResult = SfdcBinding.query(soql);

                if (queryResult.size > 0)
                {
                    //put some code in here to handle the records being returned
                    int i = 0;

                    Console.WriteLine("Logged in user can see "
                          + queryResult.size + " contact records.");

                    sObject obj = new sObject();
                   
                   
                    //Lead lead = (Lead)queryResult.records[i];
                    //string firstName = lead.FirstName;
                    //string lastName = lead.LastName;
                    //string businessPhone = lead.Phone;
                }
                else
                {
                    //put some code in here to handle no records being returned
                    string message = "No records returned.";
                }

 

Any ideas would be greatly appreciated!

  • February 03, 2010
  • Like
  • 0
Hi

Is it possible to write a formula that essentially breaks the shipping address down into the individual lines?

We have an external system that needs to receive the address fields for a child object to an Account in three separate fields.

I figure if I can identify a new line character, then this should be pretty straight forward, but I can't figure out how to do this.
Any ideas?

thanks
Nick