• Kapil Kaushik
  • NEWBIE
  • 69 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 8
    Questions
  • 20
    Replies
Hi All,

I tried to integrate SAP with salesforce by lightning connect and I was facing the issue when while validating and syncing it.

I think the problem is with my URL (https://sapes4.sapdevcenter.com/sap/opu/odata/sap/SALESORDERXX) which I am using in External data source.

Your help will be really appreciated. Thanks in advance.

Kapil Kaushik
I am new to salesforce and need your help urgently.
 I have an object A having field say Opportunity.
 In object B,I have an field of lookupfield of opportunity field from object A and one qty field in object B
 I can have multiple records in object B for one opportunity.
like in record 1  - Opp1   qty 2
in record 2 -        Opp1   qty 3
in record 3 -        Opp1   qty 4
in record 4 -         Opp2 qty 5 then in total field of object B for opp2 total to be displayed as 5.
In object B in total field i want to display total count as (2+3+4)  whenever field is updated for Opp1 .
Count should be updated whenever qty is inserted/updated/deleted in object B
 
HI,
here i was attached two pics 
my quetion is how to write a trigger as 
when creating a record in account, Account Name will comes to related contact last name
User-added image



User-added image

please help me,


thanks,
NAGARJUNA REDDY NANDIREDDY
Please let me know the error in "SELECT id, name, status_del__c, rate_state2__c, quote_origin__c, createdby.profile.name, lastmodifiedby.profile.name, (CreatedDate - (1/6.0)) quoted_date, lastmodifieddate FROM opportunity " 
I have a custom object "Commission", and Opportunity has a lookup to the custom object. Each "Commission" could have a handful of Opportunities related to it. Need a basic trigger that grabs the total of the Opportunity Amounts attached to the commission and updates a currency field on the Commission record record. 
I must be missing something but I'm new enough to not know what it is.  Thanks for any help.
Error : Variable does not exist: ApexPages
 
public class myClass {

    public String getIP() {
        String ip = null ;
        /* Don't work
         * String ip = ApexPages.currentPage().getHeaders().get('True-Client-IP');
        if (ip == '') {
            ip = ApexPages.currentPage().getHeaders().get('X-Salesforce-SIP');
        }*/
        system.debug(ApexPages);
        Map<String, String> entetes = ApexPages.currentPage().getHeaders();
        if(entetes != null) {
            ip = entetes.get('True-Client-IP');
            system.debug('-------Client IP------'+ip);
            if(ip == null)
                ip = entetes.get('X-Salesforce-SIP');
                system.debug('-------Salesforce IP------'+ip);  
        }
       return ip ;
    }
}


 
Explaining my scenerio - 

My app is using some data(Some numbers) which generally changed in 2-6 months. And my app calcualte some percentage based on that data. Currently I am implementing this thing in the following way - 

1) I have written a web service which return the data using Heroku on which I am performing some calculation in my app.

can there be some other soloution from where can I keep that data ?
Need help in code coverage for constructor with parameters(controller).
PScRMAExtension is EXTENSION
PScRMAExtension_v1  is CONTROLLER

/*
    *Class constructor
    */
    public PScRMAExtension(PScRMAExtension_v1 objext)
    {
        system.debug('$$$ <PScRMAExtension::PScRMAExtension>');
        parent_case_id = ApexPages.currentPage().getParameters().get('id');
        //parent_case_id = '50011000008KcEV';
        //currentInstance = this;
        //case_list = (Case)controller.getRecord();
        RMALineItemCnt = 0;
        show_RMA_list = FALSE;
        showAdvanceExchange = FALSE;
        show_flash_alert = FALSE;
        show_expired_contract_alert = FALSE;
        accept_expired_contact = FALSE;
        show_case_detail = FALSE;
        show_fru_detail = FALSE;
        asset_exists = FALSE;
        show_cli_grid = FALSE;
        show_asset_grid = TRUE;
        disable_save_btn = FALSE;
        show_add_line_item = FALSE;
        show_expired_Asset_alert =FALSE;
        isRMASLASameDay = false;
        isshowassetExipre=FALSE;
        isshowRMAexits =FALSE;
       
        //show_replacement_part_confirmation = FALSE;
        //accept_replacement_part = FALSE;

        RMA_line_item_wrapper_list = new List<PScRMALineItemsWrapper>();
        new_line_item_obj = new RMA_Line_Items__c();
        RMA_line_item_list = new List<RMA_Line_Items__c>();
        view_line_item_obj = new RMA_Line_Items__c();
        line_save_text = 'Add Line Item';
        obj_line_item_tosave = new List<RMA_Line_Items__c>();

        rmaAssignedRtName = '';
        primaryOwnerFld = '';
        secondaryOwnerFld = '';
        default_country = 'United States';

        //replacement_part_error_msg = '';
        system.debug('show_add_line_item1' + show_add_line_item);

        //stateList = new List<selectOption>();
        //stateList.add(new selectOption('', '--None--'));

        //system.debug('$$$ parent_case_id: ' + parent_case_id);
        if(parent_case_list == null)
        {
            parent_case_list = [ SELECT Account.Name, Account.Company_Name__c, Account.ShippingStreet, Account.ShippingCity, Account.ShippingState, Account.ShippingCountry, Account.ShippingPostalCode, Account.Phone, Account.Email__c, Contact.Name, Contact.MailingStreet, Contact.MailingCity, Contact.MailingState, Contact.MailingCountry, Contact.MailingPostalCode, Contact.Phone, Contact.Email, AccountId, ContactId, AssetId, CaseNumber, Subject, Description, Status, Priority, Severity__c, Serial_No__c, Platform__c, Product_Series__c, Ship_To_Account__c FROM Case WHERE Id = :parent_case_id ];
            account_id = parent_case_list.AccountId;
            asset_serial_no = parent_case_list.Serial_No__c;

            if(parent_case_list.Account.Company_Name__c != null)
            {
                account_name = parent_case_list.Account.Company_Name__c;
            }
            else
            {
                account_name = parent_case_list.Account.Name;
            }

            populateIB();
        }
        system.debug('$$$ parent_case_list: ' + parent_case_list);

        List<CreateCaseRT__c> ccRtList = CreateCaseRT__c.getAll().values();
        if(ccRtList.size() > 0)
        {
            for(CreateCaseRT__c t : ccRtList)
            {
                if(t.Case_Trans_Type__c == system.label.RMA_Transaction_Type)
                {
                    rmaAssignedRtName = t.Name;
                }
            }
        }

        getFlashAlerts();
        RMALineItemDetails();
        getReplacementPart();
        getRMALineItemCnt();
        
        system.debug('in PScRMAExtension show_cli_grid ' + show_cli_grid);
        system.debug('in PScRMAExtension show_asset_grid ' + show_asset_grid);
    }
what is difference between between insert and include and define?
Hi Guys,
I have wrote a vf page which is used to display input fields based on LeadSource. If LeadSource == 'web' then it should dispaly Description. But below code is not working..
Help me regarding this. Thank You

<apex:page standardController="Contact">
    <apex:form >
        <apex:pageBlock title="Enter Contact Information">
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!Save}" />
            
            </apex:pageBlockButtons>
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Contact.LastName}" />
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Lead Source"/>
                    <apex:actionRegion >
                    <apex:inputField value="{!Contact.LeadSource}" >
                        <apex:actionSupport event="onChange" reRender="ajaxrequest" />
                        </apex:inputField>
                    </apex:actionRegion>
               
                </apex:pageBlockSectionItem>
            
            </apex:pageBlockSection>
        
            <apex:outputPanel id="ajaxrequest">
                <apex:pageBlockSection rendered="{!Contact.LeadSource=='Web'}">
                    <apex:inputField value="{!Contact.Description}"/>
  
                </apex:pageBlockSection>
                <apex:pageBlockSection rendered="{!Contact.LeadSource=='Phone Inquiry'}">
                <apex:inputField value="{!Contact.Phone}"/>
                   </apex:pageBlockSection>
                </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>
</apex:page>
We can modify the Permission Sets using Apex in our Development org.
But can we change the Permission set by writing code in the Post Install Script after package Installation without cloning Permission sets ?