• eric_dev
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 12
    Replies

Hi

 

How can transfer Credentials to external third party web service

 

I loaded external web service wsdl to apex class by generate to apex.

 

And have a button that calls to new class method.

 

External WS expects to get Credentials username and password and It fails because it’s not trnasferred.

 

 

 It works fine .Net C# as below:

 

 

WSClass variable= new WSClass ();

 

NetworkCredential credentials = new NetworkCredential("username", "password");

 

variable.Credentials = credentials;

 

 

 

How can I transfer in APEX?

 

Is “Certificate and Key Management” can be a solution?

And which one (Create Self-Signed Certificate or Create CA-Signed Certificate)

 

Or any other solution

 

 

Thank you

Eric

 

Hi, I have two objects with Master / Detail relationship

Master: API Name: SD_User__c

Object Name:SD_User SD License

 

Detail: API Name: SD_License_in_Opportunity__c

Object Name: SD_License_in_Opportunity

Plural Label: SD Licenses in Opportunity

Singular Label: SD License in Opportunity

 

Custom field that connect to Master:

API Name: SD_User__c

Field Name: SD_User

Field Label: SD License

 

I have a nested query that works fine in Sandbox but i can’t run it properly in production because of incorrect

From nested section (from detail object)

 

There is a Sandbox query:

for (SD_User__c sdUserList : [SELECT Id,
(select IsGlobalOpportunity__c, Opportunity__c From R00NT00000014FUrMAM ), Contact_Name__c 
FROM SD_User__c WHERE Contact_Name__c in :conID and IsDeleted=false])
{
    SD_License_in_Opportunity__c[] sdOpp = sdUserList.R00NT00000014FUrMAM;
    for(Integer j=0;j<sdOpp.size();j++)
    {   }

R 00NT00000014FUrMAM is  ID of SD_License_in_Opportunity__c. SD_User__c

 

My problem is reproduce it in Production environment

I tried to take that production field Id  00N200000026lpO and to complete it to 18 chars (R00N200000026lpOEAB according to SF instructions, i hope i did correctly) –  from 00N200000026lpOEAB

 

I tried also to write From Plural Label (to delete all spaces and to add __r) -  from SDLicensesinOpportunity__r

 

SF doesn’t recognized it. I get an error:

Compile Error: line 1, column 30: Didn't understand relationship 'SDLicensesinOpportunity__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

 

PLEASE HELP

 

Thank you

 

Hi

I have lead converted process that converts lead and creates new Account.

In Account object, I added lookup field to Lead. (for creating new custom  report type)

 

Is there any way or workaround to link converted Lead to Account???

 

I get following  error from trigger :

CANNOT_UPDATE_CONVERTED_LEAD, cannot reference converted lead: [Lead_Name__c]

 

 

Thank you

 

Eric

Hi,

I’m use Site technology for upload file from Client to Salesfroce. It appears in Case related list Notes and Attachments.

File format is CSV.

 

How can i get content of CSV file and insert a data into Salesforce object

I thought something similar to Select Body from Attachment….and

 

Does somebody has idea how to do it by APEX or via API

 

Thank you

Hi,

I have external .Net application (c#) that user enter username and password and logins to Salesforce.

 

As one of requirements, i should open opportunity record in salesforce

without entering again login details https://na3.salesforce.com/0065000000AZxxxx

 

Or at least to open home page (https://na3.salesforce.com/home/home.jsp)

 

What should I transfer to salesforce and what is a correct syntax?

I assume that it should be session ID, URL and maybe something else

 

Thank you

Hi, i'm developing integration project between salesforce and internal application (c# framework 2.0)

 

i should get Account records that LastModifiedDate greater then last suscesfull run.

SOQL requres date in GMT format.

 

How can i convert 14/06/2009 16:41:38 datetime to 2009-06-14T03:05:41.000Z format

 

 

Thank you

Hi,

I have requirement to change Lead Conversion process:

To add ability to choose existed Opportunity and not just create new one.

It should be similar to Account and Contact selections.

 

How can i add that option or create new Lead Conversion process?

 

Any ideas or samples would be appreciated.

 

Thank you

 

 

Eric 

Hi

 

How can transfer Credentials to external third party web service

 

I loaded external web service wsdl to apex class by generate to apex.

 

And have a button that calls to new class method.

 

External WS expects to get Credentials username and password and It fails because it’s not trnasferred.

 

 

 It works fine .Net C# as below:

 

 

WSClass variable= new WSClass ();

 

NetworkCredential credentials = new NetworkCredential("username", "password");

 

variable.Credentials = credentials;

 

 

 

How can I transfer in APEX?

 

Is “Certificate and Key Management” can be a solution?

And which one (Create Self-Signed Certificate or Create CA-Signed Certificate)

 

Or any other solution

 

 

Thank you

Eric

 

Hi, I have two objects with Master / Detail relationship

Master: API Name: SD_User__c

Object Name:SD_User SD License

 

Detail: API Name: SD_License_in_Opportunity__c

Object Name: SD_License_in_Opportunity

Plural Label: SD Licenses in Opportunity

Singular Label: SD License in Opportunity

 

Custom field that connect to Master:

API Name: SD_User__c

Field Name: SD_User

Field Label: SD License

 

I have a nested query that works fine in Sandbox but i can’t run it properly in production because of incorrect

From nested section (from detail object)

 

There is a Sandbox query:

for (SD_User__c sdUserList : [SELECT Id,
(select IsGlobalOpportunity__c, Opportunity__c From R00NT00000014FUrMAM ), Contact_Name__c 
FROM SD_User__c WHERE Contact_Name__c in :conID and IsDeleted=false])
{
    SD_License_in_Opportunity__c[] sdOpp = sdUserList.R00NT00000014FUrMAM;
    for(Integer j=0;j<sdOpp.size();j++)
    {   }

R 00NT00000014FUrMAM is  ID of SD_License_in_Opportunity__c. SD_User__c

 

My problem is reproduce it in Production environment

I tried to take that production field Id  00N200000026lpO and to complete it to 18 chars (R00N200000026lpOEAB according to SF instructions, i hope i did correctly) –  from 00N200000026lpOEAB

 

I tried also to write From Plural Label (to delete all spaces and to add __r) -  from SDLicensesinOpportunity__r

 

SF doesn’t recognized it. I get an error:

Compile Error: line 1, column 30: Didn't understand relationship 'SDLicensesinOpportunity__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

 

PLEASE HELP

 

Thank you

 

I have an (after insert, after update) on Opportunity. I monitor the (AccountId) for changes.

 

trigger updateOpportunity on Opportunity (after insert, after update)
{
    Set<Id> opiIds = new Set<Id>();
   
    for (Opportunity opp : trigger.new)
    {
        if (System.Trigger.isInsert) {
            oppIds.add(opp.Id);
        }
        if (System.Trigger.isUpdate) {
           if (Util.hasChanges(fieldsTracked, opp, trigger.oldMap.get(opp.Id))) {
           oppIds.add(opp.Id);
           }
        }
    }
    if (oppIds.isEmpty()) {
        return;
    }
// Do some stuff

 

If I physically move the Opportunity from one Account to another, the trigger fires as expected. But when I merge two accounts, the opportunity thereotically changes it's parent association to the new AccountID, and my trigger monitors changes to this filed, but the trigger doesn't fire.

 

Is there a function to monitor a merge differently than an update? trigger (after merge) isn't accepted, and (System.Trigger.isMerge) isn't accepted either.

 

Yes the Master is the new Account, and the Opportunity is associated to the old Account which gets deleted after merge. So one would think that the Opportunity is getting updated with a new AccountId, but if (Util.hasChanges(fieldsTracked, opp, trigger.oldMap.get(opp.Id))) still produces 'FALSE'.

 I am currently building a Visualforce site and would like to use the built in Visualforce date picker. The problem when I include the standard style sheets they interfere with the design of the site.   Is it possible just to include the css only for the date picker while excluding the remaining css from the standard style sheets? If so what parts of the standard styles sheets do I need to include in order for this component to work correctly?

Hi,

I have external .Net application (c#) that user enter username and password and logins to Salesforce.

 

As one of requirements, i should open opportunity record in salesforce

without entering again login details https://na3.salesforce.com/0065000000AZxxxx

 

Or at least to open home page (https://na3.salesforce.com/home/home.jsp)

 

What should I transfer to salesforce and what is a correct syntax?

I assume that it should be session ID, URL and maybe something else

 

Thank you

Hi,

 

My Save button doesn't work 

I am attempting to mimic web-to-lead and (later web-to-case) functionality using the following:

 

  • visualforce. 
  • partner portal (which is free, but doesn't allow self registration)
  • standard controller for lead.

 

 

Here's what I've come up with:

 

My Problem: 

SAVE doesn't work.

 

In case you are curious, The reason I'm not using the standard webform is:

 

  • I get the visual design for free
  • I don't have to modify the form every time I modify a pick list (which is very annoying).
  • (Later on. I can use apex code after the submission.)
Any ideas?

Thanks in advance.
 
Comments:
  • I tried to use the same page from salesforce (rather than from the site, so we have authentication).
    I still CAN'T Save, BUT if there is an ?id=XXXXXXXXXX in the URL, I can make a change, and save. this works.
  • I'm attaching the outer part of my VF page, just so you see I'm using standarrd functionality, apex: inputfield and no special tricks.

<apex:page standardController="Lead">

<apex:form > <apex:pageBlock title="Initial Agreement" mode="edit">

 

<apex:pageBlockButtons >

<apex:commandButton action="{!save}" value="Save"/>

</apex:pageBlockButtons><apex:pageBlockSection title="Title" columns="1">

<apex:outputText ><br/>Welcome to My Application form.<br/>Please fill in the form below. </apex:outputText>

<apex:inputfield value="{!Lead.Agreement__c}" />

<!-- more input fields here -->

<!-- more input fields here -->

<!-- more input fields here -->

<!-- more input fields here -->

</apex:pageblocksection></apex:pageBlock></apex:form></apex:page>

 



 

Message Edited by beener on 11-12-2009 01:47 PM
Message Edited by beener on 11-12-2009 01:48 PM
  • November 10, 2009
  • Like
  • 0

The ability to generate and attach a .pdf document to an e-mail generated by an Visualforce Page e-mail template is fairly straightforward using the <messaging:attachment renderAs="pdf"> capability.  However, this method generates a .pdf file from whatever is contained between the <messaging:attachment> and </messaging:attachment> tags.

 

My problem is that I already have a .pdf document stored in a Documents folder in SFDC and I want to automatically attach that document to an e-mail generated by a Visualforce Page template without the user having to go through the  the document selection and attachment process.  I don't want to have to re-generate the document, just attach it.

 

Any ideas?

Hi !

I have email alert on custom object, so, i have VF Email Template (VFET) for that 

 

Record of custom object have some atachemts - i want put it to email.

 

 

Now i can to attach only pictures. VFET have that:

<messaging:attachment renderas="pdf" filename="{!relatedTo.Name}">  

and component with that:

<apex:image url="/servlet/servlet.FileDownload?file={!doc}"/>

 

But it works for pictiures only, rendered as pdf.

How with docs and pdf from related Notes & Attachments ?

 

 

 

 

 

  • June 18, 2009
  • Like
  • 0

Hi, i'm developing integration project between salesforce and internal application (c# framework 2.0)

 

i should get Account records that LastModifiedDate greater then last suscesfull run.

SOQL requres date in GMT format.

 

How can i convert 14/06/2009 16:41:38 datetime to 2009-06-14T03:05:41.000Z format

 

 

Thank you