• UAD
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hello there,

 

I need to set an http request with the setMethod('POST'); i already did a few http request with the GET method and it was working pretty well, but my POST request doesn't work.

 

I was thinking that i just need to change the setMethod parameter, after a few research i saw a way to put the parameters

using setBody but isn't working. I got error from my server as "Invalid parameters"

 

Here some code sample:

 

    	Http http = new Http();
        HttpRequest req = new HttpRequest(); 
        HttpResponse res = new HttpResponse();
        req.setMethod('POST');
        req.setEndpoint('http://www.usineadesign.com/api/order?input=');

 

And i tried to pust the parameters following this way:

 

req.setBody(EncodingUtil.urlEncode(string.valueof(line.Id_uad__c), 'UTF-8')+'|'+ EncodingUtil.urlEncode(string.valueof(line.Quantity.setscale(0)), 'UTF-8')
				+ '|' +EncodingUtil.urlEncode(string.valueof(line.Quantity.setscale(0)), 'UTF-8') + EncodingUtil.urlEncode(line.MPN__c , 'UTF-8') + '|' +
				EncodingUtil.urlEncode(string.valueof(line.UnitPrice) , 'UTF-8'));

 

Does anyone can help me?

Thanks

  • October 08, 2012
  • Like
  • 0

Hello!

 

I have a trigger on Opportunity who is working pretty well!
But my user have to press F5 (refresh) to see the Opportunity line item updated on the opportunity page.

 

Does any way exist to update the opportunity page after the (after insert) trigger.

 

Note: 

My trigger has a Future annotation 

 

 

Thanks

 

  • October 05, 2012
  • Like
  • 0

Hi,

 

I created a custom object who has a master-details relationship,indeed, this custom object will only be used as a child of my opportunity.

I needed to set an auto-number for this object, by the way it's pretty easy , but  the issue is that i want to make this number continuous for his master opportunity.

 

Example:

 

The  auto-number is set as : INV-{DD}{MM}{YYYY}-{000000}

If i'll create a record on my opportunity called 'Opportunity#1' the number will be INV-021012-001

Afterwork i'll create a second record on an other opportunity called 'Opportunity#2' the number will be INV-021012-002

 

Do you any way to make the auto number continuous?

 

 

edit:

I imagine a way with and hidden field and workflow rules but it's a bit mess isn't it?

 

  • October 02, 2012
  • Like
  • 0

Hi,

 

I started to use the visual flows (and it's pretty usefull).

But i'm trying to understand how are working the Plugins.

 

I just want to get the id of my standard pricebook to make a pricebookentry.

I put implements Process.Plugin in my class but i didn't understand how can i do to send it back to my flows.

 

Anyonme?

Sincerely,

  • September 17, 2012
  • Like
  • 0

Hello!

 

I have a trigger on Opportunity who is working pretty well!
But my user have to press F5 (refresh) to see the Opportunity line item updated on the opportunity page.

 

Does any way exist to update the opportunity page after the (after insert) trigger.

 

Note: 

My trigger has a Future annotation 

 

 

Thanks

 

  • October 05, 2012
  • Like
  • 0