• Shoby Abdi.ax910
  • NEWBIE
  • 30 Points
  • Member since 2011

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

Hi,

 

Is there a quick way that i can get the company name of the user using this part of my controller or do i have to create another variable and soemhow add it to that?

 

I was wodnering if there was a way in being able to pull the information from the system.userinfo field?

 

 

public with sharing class CaseExtension {
    
    public Case mycase {get; set;}
    public User localUser {get; set;}
    public String route {get; set;}
    
    public CaseExtension(ApexPages.StandardController stdController) {
        this.mycase = (Case)stdController.getRecord();
        localUser = [SELECT Id, Phone, Email, FirstName, LastName from User where Id =: System.UserInfo.getUserId() LIMIT 1];
        this.mycase.OwnerId = localUser.Id;
        
    }

Thanks for any help in advance!

 

 

I havepatch organizations enabled, but my "Scheduled Push Upgrades" button is disabled when I click "Push Upgrades" on the version of a managed package!

 

I've created a patch org.

I updated the patch org with a fix.

I uploaded.

I go back to my main org.

I click "Push Upgrade"

"Scheduled Push Upgrade" button is disabled.

 

Any ideas?

We sell managed packages and use LMA for license enforcement.  Our customers can purchase monthly licenses or perpetual licenses, the latter of which require them to pay annual maintenance to obtain upgrades and support.

 

If someone stops paying the monthly fee its easy to turn the license completely off.  But if someone purchases a perpetual license and stops paying annaul maintenance, I want to allow them to continue to use the package version they currently have installed, but prevent them from installing an upgrade.

 

Does anyone know if it is possible to check a license record during an install for a Maintenance Expires date and only allow a package upgrade based on that date?  If not, my only remedy is to make the customer pay for support to continue using the version they were contractually unauthorized to install, or force them to uninstall and re-install an older version.  Neither of these alternatives are good.

 

Thanks in advance,

 

Chad

In my apex code, system.now() returns the current Datetime based on a GMT calendar. My aim is to get the date time value in my local time zone.Since we have day light saving, I didn't think  about manipulating the time difference.

 

I would appreciate your suggestions.

 

Under personal information, I have set the time zone as "Time Zone(GMT-05:00) Eastern Daylight Time (America/New_York)".

 

 

 

 

Hi,

 

Is there a quick way that i can get the company name of the user using this part of my controller or do i have to create another variable and soemhow add it to that?

 

I was wodnering if there was a way in being able to pull the information from the system.userinfo field?

 

 

public with sharing class CaseExtension {
    
    public Case mycase {get; set;}
    public User localUser {get; set;}
    public String route {get; set;}
    
    public CaseExtension(ApexPages.StandardController stdController) {
        this.mycase = (Case)stdController.getRecord();
        localUser = [SELECT Id, Phone, Email, FirstName, LastName from User where Id =: System.UserInfo.getUserId() LIMIT 1];
        this.mycase.OwnerId = localUser.Id;
        
    }

Thanks for any help in advance!

 

 

Hey Everyone,

 

I am having difficulty running some tests with triggers.

 

First trigger updates an Event object when an Opp has been updated.

The second trigger tries to update the Opp when the Event has been updated.

 

Just trying to keep information accurate on each object, however as you can imagine if I update from either trigger it runs the trigger for the other object and I get a recursive trigger execution.

 

Both are running 'after update'.

 

Is there a simple method or way to update each record without it having to trigger the other? Maybe it is as simple as checking if the values match before running an update?

 

Looking for some guidence on the workflow, or method to accomplish keeping two records up to date without having recursive triggers running.

 

I appreciate any help! :)

  • February 01, 2011
  • Like
  • 0

Does anyone see the reason why this service can't be consumed by WSDL2Apex for generating my callout classes in Apex?

 

I am trying to make some SOAP WS calls to Sharepoint Server from Salesforce.

 


<wsdl:definitions xmlns:s0="urn:Microsoft.Search" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://microsoft.com/webservices/SharePoint/QueryService" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://microsoft.com/webservices/SharePoint/QueryService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Microsoft Windows SharePoint Server 3.0 Search Query Web Service</wsdl:documentation>
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="urn:Microsoft.Search">
      <s:element name="Query">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="queryXml" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="QueryResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="QueryResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Registration">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="registrationXml" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="RegistrationResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="RegistrationResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Status">
        <s:complexType />
      </s:element>
      <s:element name="StatusResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="StatusResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
    <s:schema elementFormDefault="qualified" targetNamespace="http://microsoft.com/webservices/SharePoint/QueryService">
      <s:element name="QueryEx">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="queryXml" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="QueryExResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="QueryExResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="QuerySoapIn">
    <wsdl:part name="parameters" element="s0:Query" />
  </wsdl:message>
  <wsdl:message name="QuerySoapOut">
    <wsdl:part name="parameters" element="s0:QueryResponse" />
  </wsdl:message>
  <wsdl:message name="QueryExSoapIn">
    <wsdl:part name="parameters" element="tns:QueryEx" />
  </wsdl:message>
  <wsdl:message name="QueryExSoapOut">
    <wsdl:part name="parameters" element="tns:QueryExResponse" />
  </wsdl:message>
  <wsdl:message name="RegistrationSoapIn">
    <wsdl:part name="parameters" element="s0:Registration" />
  </wsdl:message>
  <wsdl:message name="RegistrationSoapOut">
    <wsdl:part name="parameters" element="s0:RegistrationResponse" />
  </wsdl:message>
  <wsdl:message name="StatusSoapIn">
    <wsdl:part name="parameters" element="s0:Status" />
  </wsdl:message>
  <wsdl:message name="StatusSoapOut">
    <wsdl:part name="parameters" element="s0:StatusResponse" />
  </wsdl:message>
  <wsdl:portType name="QueryServiceSoap">
    <wsdl:operation name="Query">
      <wsdl:input message="tns:QuerySoapIn" />
      <wsdl:output message="tns:QuerySoapOut" />
    </wsdl:operation>
    <wsdl:operation name="QueryEx">
      <wsdl:input message="tns:QueryExSoapIn" />
      <wsdl:output message="tns:QueryExSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Registration">
      <wsdl:input message="tns:RegistrationSoapIn" />
      <wsdl:output message="tns:RegistrationSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Status">
      <wsdl:input message="tns:StatusSoapIn" />
      <wsdl:output message="tns:StatusSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="QueryServiceSoap" type="tns:QueryServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Query">
      <soap:operation soapAction="urn:Microsoft.Search/Query" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="QueryEx">
      <soap:operation soapAction="http://microsoft.com/webservices/SharePoint/QueryService/QueryEx" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Registration">
      <soap:operation soapAction="urn:Microsoft.Search/Registration" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Status">
      <soap:operation soapAction="urn:Microsoft.Search/Status" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="QueryService">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Microsoft Windows SharePoint Server 3.0 Search Query Web Service</wsdl:documentation>
    <wsdl:port name="QueryServiceSoap" binding="tns:QueryServiceSoap">
      <soap:address location="https://XXXX.YYYYYYYYYYYY.com/_vti_bin/spsearch.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Hi ,

 

I've been working on some search criteria, for which i need to display picklist from different objects , but inorder to dispaly the picklist and their dependacies we need to have object level permissions (CRED) .

 

So my question is , that  there is any other way to get the dependant values , instead of querying the whole object as there are more than 20000 records and I am hitting the limits for few combinations.

 

Just wanted to know that it is possible using Global Describe or something ........

 

 

  • January 31, 2011
  • Like
  • 0

When I am using


 

 

<apex:selectRadio id="slctRd" dir="ltr" required="true" layout="pageDirection" value="{!selectedValue}" immediate="true" onclick="alert('hi);">
<apex:selectOptions id="selRdOptn" value="{!Options}"/>
</apex:selectRadio>

 

 

 

. The label is appearing before the radio button is it by default? I did not find any option to change the Radio button from Extreme right orientation to extreme left orientation.

 

- Samarthya

I have a class which is not using the with sharing modifier.

 

I need to ensure that people aren't enabled to delete opportunities they shouldn't.

 

All of the people who aren't supposed to delete opportunities share a profile, and the Delete CRUD setting is switched off.

 

 

How do I query the CRUD to determine if the current user is enabled to delete an Opportunity?

 

I know about how to determine current context access to deletion:

 

if(!Opportunity.sObjectType.getDescribe().isDeletable()){
 //current context does not permit opportunity deletion.
}

 

 

but since we aren't using the with sharing modifier, this won't work.... Help?

 

Trying  to get the code below to work. I want to create a task when a case owner is changed and assign that task to the new owner using a trigger on the Case object.

 

As the new case owner can be a user or a queue I want to check the new owner's type before creating the task. i.e. if Case Owner is now a queue, then don't create a task.

 

 But for some reason newCase.Owner.Type returns null, when I'm expecting 'User'. Any ideas?

trigger tgrCaseAfterUpdate on Case (after update) {
    for (Case newCase : Trigger.new){        
        Case oldCase = System.Trigger.oldMap.get(newCase.Id); //get old Case
        if(oldCase.ownerID!=newCase.ownerID) &&(newCase.Owner.Type=='User')){
            Task act = new Task();
            act.Subject = 'Case '+newCase.casenumber+' has been assigned to you';
            act.Description = 'Case '+newCase.casenumber + ' has been assigned to you. Click Related To link to view case details.';
            act.ownerId = newCase.ownerID;
            act.Status = 'Not Started';
            act.whatId = newCase.id;
            insert act;
        }
    }
}

Hi All,

 

I  have a problem with installing the packages. If the users want to install my package from appexchange, they need to install one more managed package before that.

 

If the users forgot this and tried to install my package and login to the application and follow the installation steps, finally they got the error messages like missing some packages into the system. 

 

I need this type of custom message while login to the user's credentials itself. Can I know how to do this.

 

 

Thanks in Advance.

 

Anuradha.

Hi

 

I have an scontrol that runs an external query (Noetix report), attaches the Account number from salesforce and renders results.

 

It works perfectly in IE but when if you click the link in Firefox (our preferred browser), it seems to execute but the results page is blank.

 

Can someone please help me figure this one out?

 

We have a lot of similar links and we're having to multiple browsers just to view these links.

 

This link is a Custom Account Link which calls the following scontrol

 

<html>
<head>
<script>

var accnum = "{!Account.AccountNumber}".substring(0,6);

if (accnum.length != 6) {

alert("The account number "+"{!Account.AccountNumber}"+" is incorrect.");

this.close();

} else {

var url = "http://devnoetix-dc-aus:80/NoetixGateway/ExecLinkedReportSimpleParamValues.aspx?name=afb42b63-712b-4015-923b-19fa97c773e9&type=user&prompt=no&nwq_vdir=nwq&uid=39329099288D3CCD600361E48195793F&pwd=2B6568EA8135D055CF3A8157FA4DE3E0&applicationlogindata=&secure=bound&version=3&paramvalues="+accnum;

parent.location.href = url; //pass full URL to page (refresh)
}
</script>
</head>
</html>

 

Thanks a lot

 

 

 

  • January 18, 2011
  • Like
  • 0