How can I create Projects (OPPOR) with REST?

SUGGESTED

Hi,

I'm trying to create projects (GESOPP) through REST Webservice..

I can create into OPPOR table but when I try to create for OPPORCRM (needed to be visible in GESOPP function) get the error message: "A Pre-sales or After-sales step must be specified".

I already tried creating manually an entry in "OPPORSTB" (pre-sale) but it still ain't working.

I really need help.

Best Regards

  • 0

    zpmarcos, Did you have any luck with this?

  • 0 in reply to Kyle Klinger
    SUGGESTED

    Hi,

    We managed to do it with two splitted requests...

    First I created two representation with edit facet. One for OPPOR class and another one for OPPORCRM class...

    Then you have to make two requests...

    1) POST : {{HOST}}/api1/{{APPLICATION}}/{{CONTRACT}}/{{ENDPOINT}}/OPPOR?representation=YOPPOR.$edit

    "{
    "OPPDESAXX": "TEST 1",
    "TCHTOREAD": "CRM",
    "OPPEXTNUM": "444457",
    "OPPPIMTYP": 1,
    "OPPCRM": [
          {
          "DAM": 0,
          "OPPAAM": 0,
          "OPPCDA": "0000-00-00",
          "OPPNBQ": 0,
          "STRSTE": "0000-00-00"
          }
    ]
    }"

    Then you get the OPPNUM that was generated... In my case "ILTLX1810000220".

    2) POST: {{HOST}}/api1/{{APPLICATION}}/{{CONTRACT}}/{{ENDPOINT}}/OPPORCRM?representation=YOPPORCRM.$edit

    "{
    "OPPNUM": "ILTLX1810000220",
    "STE": "APD",
    "DON": 1,
    "STELIN": 10

    }"

    This was the easiest way we found... Give me your feedback if you try this solution or if you have a better one.

    Best Regards