• manjunath kademani
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I need to download an image and upload it in another org through API (in a Rich Textarea). I am not showing the image in same org in VF page. Is it possible to send rich text area  image from one org to another salesforce org through API?
try to add you IP address to trusted IP ranges in salesforce . It should solve the problem.
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
Hi,

I am trying to consume Metadata API of one salesforce org to another org and trying to create custom field.

When i execute below code from developer console, i receive error saying : "System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor".

Code :
*****************************************************************************************************
MetadataService.MetadataPort service = createService();   
    MetadataService.CustomField customField = new MetadataService.CustomField();
    customField.fullName = 'Contact.TestField__c';
    customField.label = 'Test Field';
    customField.type_x = 'Text';
    customField.length = 42;
    MetadataService.AsyncResult[] results = service.create(
    new List<MetadataService.Metadata> { customField });

public static MetadataService.MetadataPort createService()
{
    partnerSoapSforceCom.Soap sp = new partnerSoapSforceCom.Soap();

    partnerSoapSforceCom.LoginResult loginResult = sp.login('username','password');

    MetadataService.MetadataPort service = new MetadataService.MetadataPort();
    service.SessionHeader = new MetadataService.SessionHeader_element();
    service.SessionHeader.sessionId = loginResult.sessionId;
    System.debug(service.SessionHeader.sessionId);
    return service;    
}

*********************************************************************************

 

 

 

I have developed a daily poll component for the force.com based site.

 

I have used customer portal to authenticate users.

I have added that component within the right hand template.

<apex:component allowDML="true" controller="cybVotePoll" id="Poll">

<apex:pageBlock title="Today's&nbsp;Poll" id="PollPageBlock" mode="edit">

<apex:panelgrid id="Graph" columns="1">

<apex:outputLabel value="{!PollQuestion}"style="font-size:12px;font-style:italic;color:#0000ff;font-weight:bold;" />

<apex:outputLabel value="{!Msg}" style="color:#ff0000;" id="msg" />

<apex:form >

<apex:selectRadio value="{!UserVote}" id="ResponsePanel" disabled="{!DisableOptions}">

 <apex:selectOptions value="{!ResponseOptions}" />

<apex:actionSupport event="onclick" action="{!SubmitVote}"rerender="ResponsePanel,msg,OutputResult" status="test" />

 </apex:selectRadio>

</apex:form>

<apex:actionStatus id="test" startText="submitting vote..." />

<apex:image width="200" height="150" url="{!ResponseUrl}"id="OutputResult" />

<apex:form >

<apex:commandLink action="{!showPastResults}"value="Past Results >>" />

</apex:form>

</apex:panelgrid>

</apex:pageBlock>

</apex:component>

  

Whenever the radio option is selected on the page, it shows error page with error as insufficient privilege.

I have removed all ther crud rights from the profile so that user could not get access to salesforce standard pages.

Please any one guide me on this issue.