• Chris Berg 6
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I have created an Apex REST service following an example from SalesForce.  I created a custom button on my Case page.  This button contains all the code I need to POST to my REST service.  Both my Case page and the URL I am calling share the same domain:

https://na16.salesforce.com/500j0000000zfug
https://na16.salesforce.com/services/apexrest/decision

I am getting a 401 (Unauthorized).  Is there something simple I can do whereby this REST call is trusted?  Should I attempt to use some existing headers from the case page to make this work?  I wanted to avoid a lot of heavy security steps for making calls inside the platform.
 
None of the sample code I tried for .NET using the Enterprise WSDL would work until I modified it for an explicit "out" parameter.  Every .NET programmer that tries the sample code will hit this problem.  Example:

                // Call describeSObjects() passing in an array with one object type name
                DescribeSObjectResult[] dsrArray;
                client.describeSObjects(
                  header, // session header
                  null, // package version header
                  null, // locale options
                  new string[] { entityName }, // object name array
                  out dsrArray
                  );

Please SF, sync up your samples with the changes to your WSDL for a better .NET experience.  =)
Hey everyone, 

the enterprise WSDL in the soap API exposes a well-known bug in the XmlSerializer in .NET.  Apparently MS has known about the bug since 2009 and has decided not to fix this.  You can read about it here on this link:  https://connect.microsoft.com/VisualStudio/feedback/details/471297

To work around this, I tweaked the WSDL with a dummy attribute.  Everyone that uses .NET with the Enterprise WSDL is going to hit this problem.  Hoping this helps.

<complexType name="ListViewRecord">
  <sequence>
   <element name="columns" type="tns:ListViewRecordColumn" maxOccurs="unbounded"/>
  </sequence>
  <xsd:attribute name="tmp" type="xsd:string" /> <!--Added by Chris Berg per bug found in XML Serializer-->
</complexType>
 
Cheers!
Hey everyone, 

the enterprise WSDL in the soap API exposes a well-known bug in the XmlSerializer in .NET.  Apparently MS has known about the bug since 2009 and has decided not to fix this.  You can read about it here on this link:  https://connect.microsoft.com/VisualStudio/feedback/details/471297

To work around this, I tweaked the WSDL with a dummy attribute.  Everyone that uses .NET with the Enterprise WSDL is going to hit this problem.  Hoping this helps.

<complexType name="ListViewRecord">
  <sequence>
   <element name="columns" type="tns:ListViewRecordColumn" maxOccurs="unbounded"/>
  </sequence>
  <xsd:attribute name="tmp" type="xsd:string" /> <!--Added by Chris Berg per bug found in XML Serializer-->
</complexType>
 
Cheers!
I have created an Apex REST service following an example from SalesForce.  I created a custom button on my Case page.  This button contains all the code I need to POST to my REST service.  Both my Case page and the URL I am calling share the same domain:

https://na16.salesforce.com/500j0000000zfug
https://na16.salesforce.com/services/apexrest/decision

I am getting a 401 (Unauthorized).  Is there something simple I can do whereby this REST call is trusted?  Should I attempt to use some existing headers from the case page to make this work?  I wanted to avoid a lot of heavy security steps for making calls inside the platform.
 

Hello , 

 

 I want to create trigger dynamically.

Basically my requirement is :

 

  I am creating custome objects dynamically throgh metadata services.

 Now whenever my new CO done, my trigger should also be created dynamically.

 

Please help me out

My requirement is something like: I have a generic trigger code, where I need to just change the object name each time and generate a new trigger from an apex code. I think trigger is also saved as a record in salesforce, so I hope it may be possible.

 

Please give me aome idea on it, if it is possible.