• Manohar SF.ax1874
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
How can I check using APEX if a JSON node exist in the input as in below?

Payload1
{
            "lname": "l1",
            "fname": "f1"
}

Payload2 
{
            "lname": "l1"
}


Thanks
Manohar
Hi everyone. I am aware that Salesforce entails a standard set of fields that can be filled by using UTM tags. For clients, I would like to activate the tracking of random User IDs in Google Analytics and then send these IDs to a field in Salesforce when they submit a form. Among the standard fields of utm source or medium, I would like to add a field that then shows the User ID that the visitor was assigned by Google Analytics. 

Does anyone have experience with this and have a simple stepwise plan I could follow to achieve this? (So far, manuals I did find either did not focus on User IDs or were too incomprehensible for me). Thanks!

(As a next step, I would also like to know how to achieve this with other Google Analytics data, such as client ID, operating system, landing page and whatnot. It's not a priority yet, but if there's like a standard way to construct these fields in Salesforce, feel free to share!)
How can I check using APEX if a JSON node exist in the input as in below?

Payload1
{
            "lname": "l1",
            "fname": "f1"
}

Payload2 
{
            "lname": "l1"
}


Thanks
Manohar

I need to write an Apex application which pushes data out of salesforce to an external application. The external application processes the records and needs to update them back to salesforce account.
I am using ruby for my external application. Since Ruby does not have great support for SOAP, I have used REST through HTTP Callout to push data out of salesforce. This comes with a limitation, salesforce allows only 10 CallOuts per action. Is there any other way? If not I will get SOAP working for me some how. But following is where I am stuck:

To pass data back to Salesforce, I will have to write global apex class with methods as ‘webService’. But since the WSDL generated is only for authenticated user, how will my external application get the session. Looking at the PHP example at http://blog.jeffdouglas.com/2009/04/05/using-php-to-call-an-apex-web-service/
I find that user name, password are required. But since my application is an apex application and any salesforce user can add and use it, how can I get session for each of the users using the app. I can’t have username, password of each of those.

I am new to Apex and not sure what are the best practices for pushing Data In and out of Salesforce through Apex. Also, not sure if above is actually feasible with Apex in first place.

Hello,

 

I have this simple VisualForce page:

 

 

<apex:page showHeader="false">
<input type='button' onclick="alert('close');window.close();" value='Close' />
</apex:page>

 

which is opened from another page using window.open(url...).

 

When I click the Close button, the onclick script does run (the alert shows up), but the popup isn't closed. Doing the same without the VisualForce APEX:PAGE tag works as expected.

 

Is there something in the markup added by VisualForce to the page that prevents it from closing? how can it be disabled?

 

Thanks,

YS

  • September 24, 2009
  • Like
  • 0

My requirement is to automatically close VF Page after clicking the save command button.

 

 

<script>
function closeRefresh()
{
top.parent.window.opener.location.href = "/003/o";
top.parent.window.close();
}
</script>

<apex:commandButton value="save" action="{!save1}" onclick="javascript&colon;closeRefresh();"/>

 

 

 

I am clicking on the link on the List view section of the consoleconsole. VF Pages open which have a save button. Which when clicked updates some values on the contact Object and should close this opened VF Page.

 

I am trying this with as shown above but not able to get it to work. Please advise!!!Thanks..

 

 

Message Edited by renuami on 08-19-2009 01:18 PM