1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/examples/Bitrix24/CreateDeal.txt

27 lines
1.1 KiB
Plaintext
Raw Normal View History

 FieldsStructure = New Structure;
FieldsStructure.Insert("TITLE" , "Planned sale");
FieldsStructure.Insert("TYPE_ID" , "GOODS");
FieldsStructure.Insert("STAGE_ID" , "NEW");
FieldsStructure.Insert("COMPANY_ID" , 1);
FieldsStructure.Insert("CONTACT_ID" , 3);
FieldsStructure.Insert("OPENED" , "Y");
FieldsStructure.Insert("ASSIGNED_BY_ID", 1);
FieldsStructure.Insert("PROBABILITY" , 30);
FieldsStructure.Insert("CURRENCY_ID" , "USD");
FieldsStructure.Insert("OPPORTUNITY" , 5000);
FieldsStructure.Insert("CATEGORY_ID" , 5);
FieldsStructure.Insert("BEGINDATE" , "2024-01-01");
FieldsStructure.Insert("CLOSEDATE" , "2030-01-01");
2025-10-20 19:41:52 +03:00
URL = FunctionParameters["Bitrix24_URL"];
Result = OPI_Bitrix24.CreateDeal(URL, FieldsStructure);
FieldsStructure.Insert("TITLE" , "Another deal");
FieldsStructure.Insert("CLOSEDATE", "2031-01-01");
2025-10-20 19:41:52 +03:00
URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];
Result = OPI_Bitrix24.CreateDeal(URL, FieldsStructure, Token);