zoukankan      html  css  js  c++  java
  • the secret of sagecrm urls

    这篇文章总结的很好。转载一下。原文地址:http://ignite.azamba.com/2012/02/the-secret-of-sage-crm-urls/

    If you’ve ever experimented with customizations in Sage CRM (Sage CRM), you’ve probably noticed the cryptic URLs Sage uses when bouncing from page to page inside the application. I don’t have all the answers to every key, but I can break down what I know to be the critical parts of a Sage CRM URL.

    The eWare DLL uses codes in the URL to display the correct information, and your custom pages should follow the same URL syntax if you want to see the correct data in the correct place.

    Take a look at the following URL:

    http://localhost/CRM/eware.dll/Do?SID=98190004832352&Act=200&Mode=1&CLk=T&Key0=1&Key1=2&Key2=2&T=Company

    You only need to look at what is displayed after the “?” in the URL. For each “=” after the “?”, you will have a key before and a value after. In between each key / value pair an ampersand “&” will be displayed. In the example above, I have the following key/value pairs.

    a)      SID=98190004832352

    b)      Act=200

    c)      Mode=1

    d)      CLk=T

    e)      Key0=1

    f)       Key1=2

    g)      Key2=2

    h)      T=Company

    SID: SageCRM generates a random session ID every time you login and maintains that random number until you logout. You’ll see a session ID in every URL in Sage CRM because it needs to authenticate you as a logged-in user when you click a button. When you logout, Sage CRM kills the session and hands you a new, unique session ID the next time you login.

    Act: This is short for “action” and tells Sage CRM what area you want to display. For example, act=200 takes you to the company summary tab in view mode. Act=201 takes you to the company summary tab in edit mode. Act=260 takes you to the opportunity summary in view mode. Act=263 takes you to the opportunity summary screen in edit mode. Unfortunately, Sage does not publish these, so you have to figure them out on your own if you want to use the native Sage CRM action codes.

    Mode: Mode is the way Sage CRM displays data and detects what to do with the data once it has been saved or cancelled. For example, clicking “Change” on a summary screen should send Sage CRM into “edit” mode, while clicking directly on a Summary tab will show the data in “view” mode. There are numerical associations with each of the modes. By passing one of these numbers through the mode key, you are telling Sage CRM how to display the data and what to do with it.

    -        View mode = 0

    -        Edit mode = 1

    -        Save mode = 2

    -        Pre-delete (delete confirmation screen) = 3

    -        Delete = 4

    -        Clear = 6

    CLk: This key stands for “Clear Locks,” which releases any locks you have on a record once you click out of it, allowing other users to make changes to that record once you have moved somewhere else in Sage CRM.

    Key: Sage CRM uses the “Key” string in the URL to tell it what record and what context you’re in. In my example above, “Key0=1&Key1=2&Key2=2”, these two would be split into three separate keys, Key0=1, Key1=2, and Key2=2. Using the reference section below, you’ll see “Key0” is the dominant key (meaning the context we’re in) and “Key1” is the record of the entity we’re viewing. So, to put it all together using the key chart below, we are in the context of the company (“Key0=1”) and looking at company with comp_companyid of 2 (“Key1=2”). The “Key2=2” part means that the primary person on this company is stored in the database where pers_personid=2.

    T: The “t” key in the URL means “tab group”. In my example, “t=Company” means Sage CRM will go into the metadata and get all tabs tied to the “Company” tab group. Specifically, the data is pulled from the Custom_Tabs table. If you have multiple tab groups for an entity, you’ll need to specify which tab group you want to display, not just the name of the entity itself.

    PreviousDominantKey = -1;

    DominantKey = 0;

    CompanyId = 1;

    PersonId = 2;

    AddressId = 3;

    UserId = 4;

    ChannelId = 5;

    CommunicationId = 6;

    OpportunityId = 7;

    CaseId = 8;

    NoteId = 9;

    TeamId = 10;

    UserAdminId = 11;

    ChannelAdminId = 12;

    LockId = 13;

    TranslationId = 14;

    LibraryId = 15;

    ProductId = 16;

    CaseProgressId = 17;

    OpportunityProgressId = 18;

    CompanySearchKey = 19;

    PersonSearchKey = 20;

    OpportunitySearchKey = 21;

    CaseSearchKey = 22;

    CommSearchKey = 23;

    AccountId = 24;

    TargetListId = 25;

    OpportunityItemId = 26;

    WorkflowId = 27;

    WorkflowActionId = 28;

    CustomDatabase = 29;

    CustomTable = 30;

    VisitorId = 31;

    UserPrefId = 32;

    CampaignId = 33;

    WaveId = 34;

    WaveItemId = 35;

    RecurrenceId = 36;

    ForeignTableId = 37;

    DataUploadId = 38;

    MatchRulesId = 39;

    CurrencyAdminId = 40;

    ReportId = 41;

    ComponentId = 42;

    ComponentScriptId = 43;

    LeadId = 44;

    LeadSearchKey = 45;

    WorkflowStateId = 46;

    MainWorkflowId = 47;

    HelpLinkId = 48;

    TransitionId = 49;

    InstanceId = 50;

    TerritoryId = 54;

    LeadProgressId = 55;

    LeadOppoMapId = 56;

    RuleManagement = 57;

    CustomEntity = 58;

    TerritoryProfileId = 59;

    FilterProfileId = 60;

    GenericPage = 61;

    ReportSearchID = 62;

    CallID = 63;

    ForecastID = 64;

    CustomViewID = 65;

    BusinessCalendarId = 66;

    HolidaySetId = 67;

    SolutionsId = 68;

    SolutionSearchKey = 69;

    SolutionProgressId = 70;

    OrderID = 71;

    LineItemID = 72;

    ForecastHistoryID = 73;

    SLAId = 75;

    OEAdmin = 76;

    OEAdminSub = 77;

    NotificationId = 78;

    PwdSecurID = 79;

    ReportFavouriteID = 80;

    AdvancedFindID = 81;

    KeyWordSearchID = 82;

    AccountSearchKey = 83;

    OrderSearchKey = 84;

    QuoteSearchKey = 85;

    QuoteID = 86;

    Integration = 87;

    This is the basic anatomy of a typical Sage CRM URL. The URL in Sage CRM passes the parameters for eWare to build a webpage with the correct information showing in the correct context. If you are experimenting with customizations in Sage CRM, I hope this brief breakdown will help you understand the critical parts of a Sage CRM URL.

    作者:Novus
    出处:http://www.cnblogs.com/novus/
    本文版权归作者和博客园共有,欢迎任何形式的转载,但请务必注明出处。

  • 相关阅读:
    CodeForces 546C(队列)
    N皇后摆放问题
    士兵队列
    货币问题
    C
    B
    ACM第三次比赛 Big Chocolate
    ACM比赛(第三次D)
    ACM第三次比赛UVA11877 The Coco-Cola Store
    uva 10382
  • 原文地址:https://www.cnblogs.com/novus/p/2538472.html
Copyright © 2011-2022 走看看